標籤:
[email protected]:~/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
[email protected]:~/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 沒法安裝的軟體
[email protected]:/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.
Linux apt-get error