linux 报错:E: Package 'libmemcached' has no installation candidate

linux 报错:E: Package 'libmemcached' has no installation candidate


 

网上查资料说是软件安装源没有这个软件,需要添加软件源。

1.备份源列表

sudo cp  /etc/apt/sources.list  /etc/apt/sources.list.bak

2.添加源列表

在这个网站上选择适合你的版本型号的源列表(一定要选对版本)

http://wiki.ubuntu.org.cn/Qref/Source#Hardy.288.04.29_.E7.89.88.E6.9C.AC

3.刷新列表

sudo apt-get update

sudo apt-get upgrade

以上是网上搜到的资料,说是很多都那样解决了,

但是尝试了如下一堆的软件源还是没有成功安装memcached的客户端libmemcached。

deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiversei
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse


deb http://archive.canonical.com/ubuntu/ trusty partner
deb http://extras.ubuntu.com/ubuntu/ trusty main

deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

 

暂时不使用apt-get方式安装libmemcached,换用编译安装的方式。

1. 下载libmemcached,当前最新版本:libmemcached-1.0.18.tar.gz,官网:https://launchpad.net/libmemcached/

wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz

2.解压

tar zxvf  libmemcached-1.0.18.tar.gz

3.进入目录

cd libmemcached-1.0.18/

4.编译安装

./configure
make
sudo make install

 

posted @ 2018-09-12 15:01  学知无涯  阅读(529)  评论(0编辑  收藏  举报