- 在ubuntu系统下,利用apt-get install命令安装程序,出现如下问题。
jianliu@ubuntu:~$ sudo apt-get install mysql-server mysql-client
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
- 可能愿意与解决方法:
(1) 可能在执行apt -get install 命令前,修改了软件源。
———-所以应该调用apt-get update ,更新源,然后再执行apt-get install命令安装程序包就OK 了。
(2)可能所选的软件源存在问题,需要换一个软件源。
#一开始选用了uestc的软件源:http:/ubuntu.uestc.cn/ubuntu,出现错误!
jianliu@ubuntu:~$ sudo apt-get update
Ign http://extras.ubuntu.com trusty InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit http://extras.ubuntu.com trusty Release.gpg
Hit http://extras.ubuntu.com trusty Release
Hit http://extras.ubuntu.com trusty/main Sources
Hit http://extras.ubuntu.com trusty/main amd64 Packages
Hit http://extras.ubuntu.com trusty/main i386 Packages
Ign http://extras.ubuntu.com trusty/main Translation-en_US
Ign http://extras.ubuntu.com trusty/main Translation-en
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Err http://ubuntu.uestc.edu.cn trusty InRelease
Err http://ubuntu.uestc.edu.cn trusty-updates InRelease
Err http://ubuntu.uestc.edu.cn trusty-backports InRelease
Err http://ubuntu.uestc.edu.cn trusty-security InRelease
Err http://ubuntu.uestc.edu.cn trusty Release.gpg
Unable to connect to ubuntu.uestc.edu.cn:http:
Err http://ubuntu.uestc.edu.cn trusty-updates Release.gpg
Unable to connect to ubuntu.uestc.edu.cn:http:
Err http://ubuntu.uestc.edu.cn trusty-backports Release.gpg
Unable to connect to ubuntu.uestc.edu.cn:http:
Err http://ubuntu.uestc.edu.cn trusty-security Release.gpg
Unable to connect to ubuntu.uestc.edu.cn:http:
Reading package lists... Done
W: Failed to fetch http://ubuntu.uestc.edu.cn/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://ubuntu.uestc.edu.cn/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://ubuntu.uestc.edu.cn/ubuntu/dists/trusty-backports/InRelease
W: Failed to fetch http://ubuntu.uestc.edu.cn/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://ubuntu.uestc.edu.cn/ubuntu/dists/trusty/Release.gpg Unable to connect to ubuntu.uestc.edu.cn:http:
W: Failed to fetch http://ubuntu.uestc.edu.cn/ubuntu/dists/trusty-updates/Release.gpg Unable to connect to ubuntu.uestc.edu.cn:http:
W: Failed to fetch http://ubuntu.uestc.edu.cn/ubuntu/dists/trusty-backports/Release.gpg Unable to connect to ubuntu.uestc.edu.cn:http:
W: Failed to fetch http://ubuntu.uestc.edu.cn/ubuntu/dists/trusty-security/Release.gpg Unable to connect to ubuntu.uestc.edu.cn:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
#后面换成cn99的软件源:http://unbuntu.cn99.com/ubuntu,一切正常!
jianliu@ubuntu:~$ sudo apt-get update
Ign http://ubuntu.cn99.com trusty InRelease
Hit http://ubuntu.cn99.com trusty-updates InRelease
Hit http://ubuntu.cn99.com trusty-backports InRelease
Hit http://ubuntu.cn99.com trusty-security InRelease
Hit http://ubuntu.cn99.com trusty Release.gpg
Hit http://ubuntu.cn99.com trusty-updates/main Sources
Hit http://ubuntu.cn99.com trusty-updates/restricted Sources
Hit http://ubuntu.cn99.com trusty-updates/universe Sources
Hit http://ubuntu.cn99.com trusty-updates/multiverse Sources
Hit http://ubuntu.cn99.com trusty-updates/main amd64 Packages
Ign http://extras.ubuntu.com trusty InRelease
Hit http://ubuntu.cn99.com trusty-updates/restricted amd64 Packages
Hit http://ubuntu.cn99.com trusty-updates/universe amd64 Packages
Hit http://ppa.launchpad.net trusty InRelease
Hit http://ubuntu.cn99.com trusty-updates/multiverse amd64 Packages
Hit http://ubuntu.cn99.com trusty-updates/main i386 Packages
Hit http://ubuntu.cn99.com trusty-updates/restricted i386 Packages
Hit http://ubuntu.cn99.com trusty-updates/universe i386 Packages
Hit http://extras.ubuntu.com trusty Release.gpg
Hit http://ubuntu.cn99.com trusty-updates/multiverse i386 Packages
Hit http://ubuntu.cn99.com trusty-updates/main Translation-en
Hit http://ubuntu.cn99.com trusty-updates/multiverse Translation-en
Hit http://ubuntu.cn99.com trusty-updates/restricted Translation-en
Hit http://extras.ubuntu.com trusty Release
Hit http://ubuntu.cn99.com trusty-updates/universe Translation-en
Hit http://ubuntu.cn99.com trusty-backports/main Sources
Hit http://ubuntu.cn99.com trusty-backports/restricted Sources
Hit http://ubuntu.cn99.com trusty-backports/universe Sources
Hit http://ubuntu.cn99.com trusty-backports/multiverse Sources
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ubuntu.cn99.com trusty-backports/main amd64 Packages
Hit http://extras.ubuntu.com trusty/main Sources
Hit http://ubuntu.cn99.com trusty-backports/restricted amd64 Packages
Hit http://ubuntu.cn99.com trusty-backports/universe amd64 Packages
Hit http://ubuntu.cn99.com trusty-backports/multiverse amd64 Packages
Hit http://ubuntu.cn99.com trusty-backports/main i386 Packages
Hit http://ubuntu.cn99.com trusty-backports/restricted i386 Packages
Hit http://ubuntu.cn99.com trusty-backports/universe i386 Packages
Hit http://extras.ubuntu.com trusty/main amd64 Packages
Hit http://ubuntu.cn99.com trusty-backports/multiverse i386 Packages
Hit http://ubuntu.cn99.com trusty-backports/main Translation-en
Hit http://ubuntu.cn99.com trusty-backports/multiverse Translation-en
Hit http://ubuntu.cn99.com trusty-backports/restricted Translation-en
Hit http://extras.ubuntu.com trusty/main i386 Packages
Hit http://ubuntu.cn99.com trusty-backports/universe Translation-en
Hit http://ubuntu.cn99.com trusty-security/main Sources
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ubuntu.cn99.com trusty-security/restricted Sources
Hit http://ubuntu.cn99.com trusty-security/universe Sources
Hit http://ubuntu.cn99.com trusty-security/multiverse Sources
Hit http://ubuntu.cn99.com trusty-security/main amd64 Packages
Hit http://ubuntu.cn99.com trusty-security/restricted amd64 Packages
Hit http://ubuntu.cn99.com trusty-security/universe amd64 Packages
Hit http://ubuntu.cn99.com trusty-security/multiverse amd64 Packages
Hit http://ubuntu.cn99.com trusty-security/main i386 Packages
Hit http://ubuntu.cn99.com trusty-security/restricted i386 Packages
Hit http://ubuntu.cn99.com trusty-security/universe i386 Packages
Hit http://ubuntu.cn99.com trusty-security/multiverse i386 Packages
Hit http://ubuntu.cn99.com trusty-security/main Translation-en
Hit http://ubuntu.cn99.com trusty-security/multiverse Translation-en
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://ubuntu.cn99.com trusty-security/restricted Translation-en
Hit http://ubuntu.cn99.com trusty-security/universe Translation-en
Hit http://ubuntu.cn99.com trusty Release
Hit http://ubuntu.cn99.com trusty/main Sources
Hit http://ubuntu.cn99.com trusty/restricted Sources
Hit http://ubuntu.cn99.com trusty/universe Sources
Hit http://ubuntu.cn99.com trusty/multiverse Sources
Hit http://ubuntu.cn99.com trusty/main amd64 Packages
Hit http://ubuntu.cn99.com trusty/restricted amd64 Packages
Hit http://ubuntu.cn99.com trusty/universe amd64 Packages
Hit http://ubuntu.cn99.com trusty/multiverse amd64 Packages
Hit http://ubuntu.cn99.com trusty/main i386 Packages
Hit http://ubuntu.cn99.com trusty/restricted i386 Packages
Hit http://ubuntu.cn99.com trusty/universe i386 Packages
Hit http://ubuntu.cn99.com trusty/multiverse i386 Packages
Hit http://ubuntu.cn99.com trusty/main Translation-en
Hit http://ubuntu.cn99.com trusty/multiverse Translation-en
Hit http://ubuntu.cn99.com trusty/restricted Translation-en
Hit http://ubuntu.cn99.com trusty/universe Translation-en
Ign http://extras.ubuntu.com trusty/main Translation-en_US
Ign http://ubuntu.cn99.com trusty/main Translation-en_US
Ign http://ubuntu.cn99.com trusty/multiverse Translation-en_US
Ign http://ubuntu.cn99.com trusty/restricted Translation-en_US
Ign http://ubuntu.cn99.com trusty/universe Translation-en_US
Ign http://extras.ubuntu.com trusty/main Translation-en
Reading package lists... Done
软件源的设置
【system setting】——>【software & Updates】——>【Ubuntu Software】—>[Download from ]————-默认情况下,选择的美国的软件源,速度很慢!
————--建议选用高校和大公司的软件源。这样apt-get install 安装程序包时速度比较快!