Linux提示Unabletolocatepackage怎么辦?
剛開(kāi)始接觸ubuntu的朋友可能會(huì)按照一些入門(mén)文章的步驟更改軟件源,可是此時(shí)安裝軟件的話(huà)會(huì)出現(xiàn)unable to locate package的錯(cuò)誤
例如:
代碼如下:
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:~$
其實(shí)問(wèn)題出在執(zhí)行sudo apt-get install之前更換了軟件源,但是卻忘了update下了,于是執(zhí)行下面的命令:
代碼如下:
sudo apt-get update
這樣一來(lái)問(wèn)題就解決了…。