Linux新手入门:Unable to locate package错误解决办法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux新手入门:Unable to locate package错误解决办法相关的知识,希望对你有一定的参考价值。

最近刚开始接触Linux,在虚拟机中装了个Ubuntu,当前的版本是Ubuntu 11.10,装好后自然少不了安装一些软件,在设置了软件的源后,就开始了 sudo apt-get install,结果出现了下面的Unable to locate package错误:
  1. [email protected]:~$ sudo apt-get install mysql-server mysql-client
  2. [sudo] password for letuknowit:
  3. Reading package lists… Done
  4. Building dependency tree    
  5. Reading state information… Done
  6. E: Unable to locate package mysql-server
  7. E: Unable to locate package mysql-client
  8. [email protected]:~$

  这叫一个郁闷啊,出师不利,不带这么吓唬刚玩Ubuntu的小朋友吧~于是赶紧找资料,又回顾下前面的操作,最后发现问题出在执行sudo apt-get install之前更换了软件源,但是却忘了update下了,于是执行下面的命令:

  1. sudo apt-get update

等上面命令执行完后,再执行sudo apt-get install就可以了!其实错误信息已经很明确了,Unable to locate packet就是无法找到包嘛,那还不赶紧sudo apt-get update下!

 

以上是关于Linux新手入门:Unable to locate package错误解决办法的主要内容,如果未能解决你的问题,请参考以下文章

分布式进阶 八 Linux提示Unable to locate package该如何处理

ubuntu中安装repo时候 提示unable to locate package repo

“Unable to locate package” while trying to install packages with APT

“Unable to locate package” while trying to install packages with APT

ubuntu16.04 apt-get 报错:E: Unable to locate package update(E: Unable to locate package upgrade)(没解决)(

Unable to locate package autoreconf