Linux apt-get error

csh@csh-laptop:~/ejabberd-15.03$ sudo apt-get install mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql
csh@csh-laptop:~/ejabberd-15.03$ sudo apt-get install mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
mysql-client : Depends: mysql-client-5.5 but it is not going to be installed
rabbitmq-server : Depends: erlang-nox (>= 1:13.b.3) but it is not going to be installed or
esl-erlang but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

 

解决方法:
使用aptitude命令来安装mysql-client-5.1

使用这个工具,当某个库依赖的库与当前版本不一致时,aptitude 会尝试降级当前这个库的版本,同时解决降级这个库对其它软件的依赖性的影响, 最终成功安装apt-get 没法安装的软件

csh@csh-laptop:/etc/apt/sources.list.d$ sudo aptitude install mysql-client-5.1

The following NEW packages will be installed:
libdbd-mysql-perl{a} libdbi-perl{a} libmysqlclient16{a}
libnet-daemon-perl{a} libplrpc-perl{a} mysql-client-5.1
mysql-client-core-5.1{a} mysql-common{a}
The following partially installed packages will be configured:
rabbitmq-server{b}
0 packages upgraded, 8 newly installed, 0 to remove and 35 not upgraded.
Need to get 11.3MB of archives. After unpacking 27.6MB will be used.

posted @ 2015-04-09 00:36  xiulug  阅读(620)  评论(0编辑  收藏  举报