Skip to content

Installing vSphere cli on Centos 6

VMware vSphere cli requires many CPAN libraries. On Centos 6 I have enabled EPEL repository and installed packages:

yum install perl-Compress-Raw-Zlib perl-Archive-Zip perl-Compress-Zlib perl-IO-Compress-Zlib perl-IO-Zlib \
perl-Crypt-SSLeay perl-ExtUtils-MakeMaker perl-libwww-perl perl-Net-SSLeay perl-SOAP-Lite perl-URI \
perl-XML-LibXML rpm-build uuid-perl libuuid-devel lwp-devel perl-Data-Dump perl-libxml-perl

But UUID is still missing and must be compiled from source.

First install development tools

yum groupinstall "Development Tools"

Then download and compile UUID

wget http://search.cpan.org/CPAN/authors/id/L/LZ/LZAP/UUID-0.05.tar.gz

tar xvzf UUID-0.05.tar.gz
cd UUID-0.05
perl Makefile.PL
make
make install

Finally vSphere cli installation

./vmware-install.pl

succeeded.

2 thoughts on “Installing vSphere cli on Centos 6”

  1. Thanks for the tip. I get a strange error thought:

    [root@PDCQUNYCACTI01 UUID-0.05]# perl Makefile.PL
    Checking if your kit is complete…
    Looks good
    Writing Makefile for UUID
    Writing MYMETA.yml and MYMETA.json
    [root@PDCQUNYCACTI01 UUID-0.05]# make
    cp UUID.pm blib/lib/UUID.pm
    /usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap UUID.xs > UUID.xsc && mv UUID.xsc UUID.c
    gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -DVERSION=\”0.05\” -DXS_VERSION=\”0.05\” -fPIC “-I/usr/lib/perl5/CORE” UUID.c
    UUID.xs:5:23: error: uuid/uuid.h: No such file or directory
    UUID.xs: In function ‘do_generate’:
    UUID.xs:13: error: ‘uuid_t’ undeclared (first use in this function)
    UUID.xs:13: error: (Each undeclared identifier is reported only once
    UUID.xs:13: error: for each function it appears in.)
    UUID.xs:13: error: expected ‘;’ before ‘uuid’
    UUID.xs:14: warning: implicit declaration of function ‘uuid_generate’
    UUID.xs:14: error: ‘uuid’ undeclared (first use in this function)
    UUID.xs: In function ‘do_unparse’:
    UUID.xs:20: error: ‘uuid_t’ undeclared (first use in this function)
    UUID.xs:20: error: expected ‘;’ before ‘uuid’
    UUID.xs:23: warning: implicit declaration of function ‘uuid_unparse’
    UUID.xs: In function ‘do_parse’:
    UUID.xs:29: error: ‘uuid_t’ undeclared (first use in this function)
    UUID.xs:29: error: expected ‘;’ before ‘uuid’
    UUID.xs:33: warning: implicit declaration of function ‘uuid_parse’
    UUID.xs:33: error: ‘uuid’ undeclared (first use in this function)
    UUID.xs:30: warning: unused variable ‘str’
    make: *** [UUID.o] Error 1

  2. I ran into the same problem as G3 commented on above. The fix is to install libuuid-devel first:

    yum install libuuid-devel

    Hopefully this helps someone else!

Leave a Reply

Your email address will not be published. Required fields are marked *