linuxamazon-ec2librsync

Install librsync on Amazon EC2 instance


I have trouble installing this library called librsync on an Amazon standard linux instance.

I tried this:

yum install librsync-devel

but I got No package librsync available (fair enough I guess!)

I also followed the install instructions, which says:

To build and test librsync from the extracted distribution do;

$ ./configure
$ make all check

I'm no linux expert, I extracted the library files and run these commands:

[ec2-user@ip-**-***-**-*** librsync]$ ./configure
-bash: ./configure: Permission denied

[ec2-user@ip-**-***-**-*** librsync]$ sudo ./configure
sudo: ./configure: command not found

[ec2-user@ip-**-***-**-*** librsync]$ sudo configure
sudo: configure: command not found

I changed permission of the configure file and run the ./configure command again. I got a long list of yes (full log here) and then this:

checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

I'm totally lost. Any idea how to install this librsync library on EC2 linux instance?


Solution

  • From the error, it looks like your configure script is not set to be executable. You can check with ls -l configure. You should see a line that starts with something like -rwxr-xr-x. If not, you can run chmod +x configure to add executable permission to it.

    If the permissions on that file are not right, it would be good to check the rest of the files in the distribution. How did you get the file? Downloading the tarball from Sourceforge? Download the ZIP from Github? Checking out from Github? And how did you extract it? If you could fill those details in to your question, as well as the full output of ls -l, that might help us figure out what happened.

    edit to add: It looks from your configure log like cpp (the C preprocessor) is looking for cc1plus, which is part of g++. You can install that with yum install gcc-c++ (remember to run as root or with sudo).

    Also, in regards to your comment, I would recommend copying the .tar.gz file directly to the Linux machine, and extracting it with tar xvzf myfile.tar.gz rather than extracting it on a Windows machine and uploading it. There are enough differences in the filesystem (how permission bits work, case sensitivity), that the process of extracting files on Windows and uploading the extracted files with something like winscp can cause problems like this.