Friday, 9 September 2016

Installing megatools on CentOS 6

In case you wanted to install the megatools command line client for Mega.co.nz and you've run into this error:

checking for GLIB - version >= 2.32.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: Glib 2.32.0 or later is required to build megatools


this is what you need to do (kudos should go to: Mike Miao) :

1. Make sure you have all the dependencies needed for MegaTools installed:

yum install gcc make  libcurl-devel openssl-devel gmp-devel tar libffi-devel gettext-devel



2. Install the 2.32 version of the glib:

1:  mkdir glib-source  
2:  cd glib-source/  
3:  wget http://ftp.gnome.org/pub/GNOME/sources/glib/2.32/glib-2.32.4.tar.xz  
4:  tar zxf glib-2.32.4.tar.xz  
5:  cd glib-2.32.4/  
6:  ./configure --prefix=/usr/local/glib-2.32
8:  make  
9:  make install  

As you can see, I preferred to install Glib 2.32 all in one directory, to avoid any mixing with the main Glib version that is shipped with CentOS. So, all files belonging to this library were installed in /usr/local/glib-2.32

3. Then, retry configuring and installing megatools, as follows:

1:  cd megatools-source  
2:  export LD_LIBRARY_PATH=/usr/local/glib-2.32/lib/  
3:  export PKG_CONFIG_PATH=/usr/local/glib-2.32/lib/pkgconfig  
4:  ./configure  
5:  make  
6:  make check  
7:  make install  



You are all set !

More instructions in the help pages of the command tools or even on: Mike Miao's page that inspired this )

No comments:

Post a Comment