2

The yum repo available on aws ec2 instances only has an old version of libmemcached: v 1.0.8.

Can anyone tell me how to get a more recent version, like 1.0.18, installed on an aws ec2 instance?

Which external yum repo can I add to install a more recent versioneven if it is unsupported?

EC2: yum info libmemcached

Using username "ec2-user". Authenticating with public key "imported-openssh-key" __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2015.09-release-notes/ No packages needed for security; 1 packages available Run "sudo yum update" to apply all updates. [ec2-user@ip-xxx-xxx-xxx-xxx ~]$ yum info libmemcached Loaded plugins: priorities, update-motd, upgrade-helper Available Packages Name : libmemcached Arch : x86_64 Version : 1.0.8 Release : 2.6.amzn1 Size : 246 k Repo : amzn-main/2015.09 Summary : Client library and command line tools for memcached server URL : http://libmemcached.org/ License : BSD Description : libmemcached is a C/C++ client library and tools for the memcached server : (http://memcached.org/). It has been designed to be light on memory : usage, and provide full access to server side methods. : : It also implements several command line tools: : : memcapable Checking a Memcached server capibilities and compatibility : memcat Copy the value of a key to standard output : memcp Copy data to a server : memdump Dumping your server : memerror Translate an error code to a string : memexist Check for the existance of a key : memflush Flush the contents of your servers : memparse Parse an option string : memping Test to see if a server is available. : memrm Remove a key(s) from the server : memslap Generate testing loads on a memcached cluster : memstat Dump the stats of your servers to standard output : memtouch Touches a key 

EC2: cat /etc/yum.repos.d/amzn-main.repo

[ec2-user@ip-xxx-xxx-xxx-xxx~]$ cat /etc/yum.repos.d/amzn-main.repo [amzn-main] name=amzn-main-Base mirrorlist=http://repo.$awsregion.$awsdomain/$releasever/main/mirror.list mirror_expire=300 metadata_expire=300 priority=10 failovermethod=priority fastestmirror_enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga enabled=1 retries=5 timeout=10 report_instanceid=yes [amzn-main-debuginfo] name=amzn-main-debuginfo mirrorlist=http://repo.$awsregion.$awsdomain/$releasever/main/debuginfo/mirror.list mirror_expire=300 metadata_expire=300 priority=10 failovermethod=priority fastestmirror_enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga enabled=0 retries=5 timeout=10 report_instanceid=yes 

Thanks!

2 Answers 2

1

You could try Remi's RPM repo. http://blog.remirepo.net/pages/Config-en

Note that it depends on EPEL and that you need to explicitly enable it when installing packages:

yum --enablerepo=remi install XXX 

NOTE: not sure if it is compatible with Amazon Linux though. If not, consider utilizing CentOS 7 which has 1.0.16 by default.

3
  • The URL I posted points to a guide on how to set up the repo. Commented Dec 22, 2015 at 20:35
  • as per their directions at your link I tried: cd /etc/yum.repos.d, wget wget rpms.remirepo.net/enterprise/remi.repo, then yum --enablerepo=remi install libmemcached but I get the error: ould not retrieve mirrorlist rpms.remirepo.net/enterprise/2014.09/remi/mirror error was 14: PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Commented Dec 22, 2015 at 20:49
  • Looks like Amazon Linux is not directly compatible with the repo. If you look at the .repo file, you see that the $releasever variable resolves to something (2014.09) other than what the repo is expecting (i.e. standard EL version strings, 6.4 etc) Commented Dec 22, 2015 at 20:58
1

I'm still trying to get a solution using an external repo as @Jukka suggests but until I do, I was able to compile it with the following:

sudo -i yum remove libmemcached.x86_64 yum install bzr.x86_64 yum install gcc-c++ mkdir -p /tmp/memcached cd /tmp/memcached wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz tar -zxvf libmemcached-1.0.18.tar.gz cd /tmp/memcached/ bzr branch lp:libmemcached cd libmemcached ./bootstrap.sh autoreconf NOTE YOU GET THE FOLLOWING ERROR BUT CONTINUE ANYWAY: "./bootstrap.sh:315: An attempt was made to set an invalid VENDOR=" cd ../libmemcached-1.0.18 ./configure make make test make install 
1
  • I got this clients/memflush.cc: In function 'int main(int, char**)': clients/memflush.cc:42:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if (opt_servers == false) ^~~~~ clients/memflush.cc:51:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if (opt_servers == false) ^~~~~ make[1]: *** [clients/memflush.o] Error 1 make[1]: Leaving directory `/tmp/memcached/libmemcached-1.0.18' make: *** [all] Error 2 Commented Dec 26, 2018 at 9:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.