(1)
Problem description:
ubuntu encountered an error when using "apt-get install" to install the program Tip:
you might want to run 'apt-get -f install' to correct these
Solution:
Use the following command to repair the installation package (but it did not work in the problem I encountered)
$ sudo apt-get --fix-broken install
Or use the command
$ sudo dpkg --purge xxx
where xxx is the program that failed to install, and its name will be given in the error prompt. However, it may also be a program that was not given in the error prompt, but the previous installation did have errors.
(2)
Problem description:
When using Ubuntu to install software, the installation fails as follows (the system is a virtual machine Newly installed):
Solution:
Enter next time on the command line:
sudo apt-get update (更新源)
Press Press Enter; then enter:
sudo apt-get install upgrade (更新已安装的包)
and press Enter; finally use the installation command:
sudo apt-get install‘软件名字’
Then you can use the apt-get install command normally!
(3)
Problem description:
I installed Ubuntu in the virtual machine. The current version is Ubuntu 11.10. After installation, it will naturally It is essential to install some software. After setting the source of the software, I started sudo apt-get install
. As a result, the following Unable to locate package
error appeared:
Solution:
I found that the problem was that I changed the software source before executing sudo apt-get install
, but I forgot to After updating, execute the following command:
sudo apt-get update
Wait until the above command is executed, then execute
sudo apt-get install
and that’s it!
Recommended tutorial: Linux tutorial
The above is the detailed content of How to solve common errors when installing linux fails. For more information, please follow other related articles on the PHP Chinese website!