最近在學習Linux系統時,網上好多帖子都是用apt-get裏下載rpm包,因而就在Google上找了個CentOS下安裝apt-get的方法 html
一、下載地址:http://pkgs.repoforge.org/rpmforge-release/shell
二、根據本身的系統下載對應的包(我是CentOS 7,下載: centos
rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm)
三、雙擊安裝,這一步作的其實就是將mirrors-rpmforge* .repos等文件放到/etc/yum.repos.d/目錄下。 post
四、安裝apt: 學習
1
|
$ yum
install
apt
|
1
|
$
sudo
apt-get update
|
2、第二種方式ui
分類: LINUXurl
apt-rpm的套件能夠在這找你OS和Arch的版本spa
http://packages.sw.be/apt/.net
以CentOS 5,i386的版本爲例unix
wget http://packages.sw.be/apt/apt-0.5.15lorg3.94a-4.el5.rf.i386.rpm
安裝套件
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
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
完成!