知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

Sub-process /usr/bin/dpkg returned an error code (1) Ubantu dpkg安装mysql-server-5.5软件包时报错解决办法

发布时间:2014-09-05 14:05:16作者:知识屋

Sub-process /usr/bin/dpkg returned an error code (1) Ubantu dpkg安装mysql-server-5.5软件包时报错解决办法
 
ubantuMySQLlinuxmysql-server-5.5dpkg
我是在安装mysql-server-5.5时,报错Sub-process /usr/bin/dpkg returned an error code (1),
 
全部卸载之前的所有以来的软件包,重新安装,还是报这个dpkg的错误,
 
sudo apt-get autoremove mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5 libnet-daemon-perl libplrpc-perl libterm-readkey-perl libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
 
sudo apt-get install mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5 libnet-daemon-perl libplrpc-perl libterm-readkey-perl libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
 
Sub-process /usr/bin/dpkg returned an error code (1)
解决方法是:
$cd /var/lib/dpkg/info
$sudo rm -rf mysql-*
 
$sudo apt-get autoremove mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5 libnet-daemon-perl libplrpc-perl libterm-readkey-perl libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
$sudo apt-get install mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5 libnet-daemon-perl libplrpc-perl libterm-readkey-perl libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
$mysql 
mysql> exit
Bye
 
OK了
 
也可以执行下面这个方法二:
$cd /var/lib/dpkg/info
$sudo rm -rf mysql*
 
$sudo apt-get -f install
$sudo apt-get  update
 
(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜