ubuntu 安装软件出错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 安装软件出错相关的知识,希望对你有一定的参考价值。

root@xxrforone:~# sudo apt-get install lrzsz
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
pure-ftpd-common libicu48 libphp-simplepie libjs-prototype php5-curl
libjs-scriptaculous libphp-snoopy libphp-phpmailer libjs-cropper
wwwconfig-common php5-intl tinymce javascript-common
Use 'apt-get autoremove' to remove them.
Suggested packages:
minicom
The following NEW packages will be installed:
lrzsz
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/111 kB of archives.
After this operation, 295 kB of additional disk space will be used.
Selecting previously unselected package lrzsz.
(Reading database ...
dpkg: warning: files list file for package `libxau6:i386' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libxau6' missing, assuming package has no files currently installed.

中间省略

dpkg: warning: files list file for package `gtk2-engines-murrine:i386' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libgmpxx4ldbl' missing, assuming package has no files currently installed.
(Reading database ... 95%dpkg: unrecoverable fatal error, aborting:
files list file for package `x11-common' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

重启完安装软件就便车这样了 怎么解决

确定你的源正确吗?源里有lrzsz这个包 特别是lrzsz的依赖包吗?

确定这些后再试
sudo apt-get update
sudo apt-get -f install
sudo apt-get autoremove
sudo apt-get install lrzsz追问

所有软件安装都显示这些

追答

所有软件都是这样的话,明显就是apt或者源出问题了,你之前做过什么操作最好回忆一下,那个操作破坏了系统中某些文件,检查你的/etc/apt/sources.list文件看看是否正常,实在不行你只有重装了。

追问

Upgrade 以后就这样了

追答

upgrade是把整个系统的包全部升级,这个非常危险,特别是在源里有不稳定包的情况下。以后别这么干了。。我们做linux都从不使用这个命令。建议你重装系统。

追问

完蛋了啊哈哈 搞得lamp vpn 还有博客

参考技术A The Following Packages Were Automatically Installed And Are No Longer Required Warning
by Vivek Gite on April 24, 2013 last updated April 24, 2013
in Debian / Ubuntu, Package Management, Troubleshooting

I have the following message whenever I use the apt-get command under Debian or Ubuntu Linux:
The following packages were automatically installed and are no longer required:
libaccess-bridge-java libjs-mochikit python-cheetah libjs-excanvas
libaccess-bridge-java-jni sabnzbdplus-theme-smpl tzdata-java
ca-certificates-java
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
How do I fix this issue? Is it safe to remove all unwanted packages?

Yes, it is safe to remove all unwanted packages to improve the system
performance and to avoid security released issues. These packages are no
longer needed by the Debian or Ubuntu Linux. Open a terminal and login
as a root user using sudo or su command. Type the following command to
remove all such packages suggested by the apt-get command :
$ sudo apt-get autoremove
OR
# apt-get autoremove
参考技术B Ubuntu 13.04 中文桌面版
这个可以试试

ubuntu16.04安装kde桌面出错

借鉴:http://www.cnblogs.com/codeblock/p/5511783.html

出错提示:

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
kubuntu-desktop 已经是最新版 (1.338)。
您可能需要运行“apt-get -f install”来纠正下列错误:
下列软件包有未满足的依赖关系:
 kde-telepathy-minimal : 依赖: kde-config-telepathy-accounts (>= 15.04.0) 但是它将不会被安装
E: 有未能满足的依赖关系。请尝试不指明软件包的名字来运行“apt-get -f install”(也可以指定一个解决办法)。12345678

然后按照tips输入sudo apt-get install -f 
结果如下:

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
正在修复依赖关系... 完成
下列软件包是自动安装的并且现在不需要了:
  ibus-pinyin kde-l10n-engb kde-l10n-zhcn libpyzy-1.0-0v5 python-xdg
使用‘sudo apt autoremove‘来卸载它(它们)。
将会同时安装下列软件:
  kde-config-telepathy-accounts
下列【新】软件包将被安装:
  kde-config-telepathy-accounts
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 98 个软件包未被升级。
有 545 个软件包没有被完全安装或卸载。
需要下载 0 B/137 kB 的归档。
解压缩后会消耗 825 kB 的额外空间。
您希望继续执行吗? [Y/n] y
(正在读取数据库 ... 系统当前共安装有 290919 个文件和目录。)
正准备解包 .../kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_amd64.deb  ...正在解包 kde-config-telepathy-accounts (4:15.12.3-0ubuntu1) ...dpkg: 处理归档 /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_amd64.deb (--unpack)时出错:
 正试图覆盖 /usr/share/accounts/services/google-im.service,它同时被包含于软件包 account-plugin-google 0.12+16.04.20160126-0ubuntu1
正在处理用于 libc-bin (2.23-0ubuntu3) 的触发器 ...在处理时有错误发生:
 /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)12345678910111213141516171819202122232425

这是一个bug解决办法在ubuntu bug report 找到的,如下:

For a temporary workaround, run (as root):

sudo dpkg -r account-plugin-google unity-scope-gdrive

This will remove the conflicting account-plugin-google package and the unity-scope-gdrive package that depends on it (as trying to remove via ‘apt-get‘ will fail)

Then, run (as root):

sudo apt-get -f install

which will finish the installation of kubuntu-desktop.


以上是关于ubuntu 安装软件出错的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu16.04安装kde桌面出错

Ubuntu 安装软件时显示:无法获得锁 /var/lib/dpkg/lock -open(资源暂时不可用)

linux ubuntu 显卡驱动安装方法

ubuntu装python3.1.1之后出错,软件中心打不开,不能重装。尝试sudo apt-get -f install报error

ubuntu 11.04下安装VMware 3.1.2出错

dpkg:处理 xxx (--configure)时出错解决办法,也可用于卸载软件出错的情况