刚开始接触ubuntu的朋友可能会按照一些入门文章的步骤更改软件源,可是此时安装软件的话会出现unable to locate package的错误
例如:
username@ubuntu:~$ sudo apt-get install mysql-server mysql-client
[sudo] password for username:
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package mysql-server
E: Unable to locate package mysql-client
username@ubuntu:~$
其实问题出在执行sudo apt-get install之前更换了软件源,但是却忘了update下了,于是执行下面的命令:
sudo apt-get update
这样一来问题就解决了….