ubuntu 软件包 build-essential 没有可供安装的候选者

Posted

tags:

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

初上手这个软件,使用的是ubuntu10.10,要装NS2,使用命令$sudo apt-get install build-essential,总是出现这个问题:软件包 build-essential 没有可供安装的候选,gcc已经装过了,软件也更新过了。是要重新下载一个build-essential软件包吗,求教啊

参考技术A 连接网络没有 参考技术B sudo apt-get update

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 中文桌面版
这个可以试试

以上是关于ubuntu 软件包 build-essential 没有可供安装的候选者的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu 软件中心怎么安装

ubuntu怎么卸载软件

ubuntu卸载软件教程ubunto怎么卸载软件?

《完美应用ubuntu》之全面管理ubuntu软件源

ubuntu 安装软件出错

ubuntu 14.04安装的软件在哪