linux centos 怎么使用apt-get

如题所述

安装套件
rpm -Uvh apt-0.5.15lorg3.94a-4.el5.rf.i386.rpm
然后去改一下 sources.list
cp /etc/apt/sources.list.d/os.list /etc/apt/sources.list
vi /etc/apt/sources.list
因为我们公司连国外不知道为什么,连国外常常就是超慢
所以我这里就不拿 http://mirror.centos.org/ 当来源了
而且义守FTP和国家高速网络中心的频宽还蛮暴力的,都跑到破千K
所以我是拿他们来当来源(其实选一个就好了,如果发现其中一个源有问题,有换另一个试下)

repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/os/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/updates/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/extras/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/fasttrack/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/addons/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/centosplus/$(ARCH)
-----------华丽丽的分割线------------------

repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/os/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/updates/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/extras/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/fasttrack/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/addons/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/centosplus/$(ARCH)

安装一下 GPG keys
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*

apt-get update

apt-get upgrade

第一次跑你可能需要先这样一下
apt-get –fix-broken install
完成!
温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网