CentOS上安装dpkg的方法
在CentOS上安装dpkg可以通过以下步骤进行: 1. 首先,你需要安装EPEL(Extra Packages for Enterprise Linux)仓库,因为dpkg包并不在CentOS的默认仓库中。你可以使用以下命令来安装EPEL仓库:
sudo yum install epel-release
[root@o2oa ~]# sudo yum install epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency ResolutionDependencies Resolved================================================================================Package Arch Version Repository Size
================================================================================
Installing:epel-release noarch 7-11 aarch64-extras 15 kTransaction Summary
================================================================================
Install 1 PackageTotal download size: 15 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : epel-release-7-11.noarch 1/1Verifying : epel-release-7-11.noarch 1/1Installed:epel-release.noarch 0:7-11Complete!
- 接着,你可以使用以下命令来安装dpkg及其开发包: sudo yum install dpkg dpkg-devel
以上就是在CentOS上安装dpkg的基本步骤。请注意,dpkg是Debian和Ubuntu系统中的包管理工具,而在CentOS中,通常使用rpm和yum来进行软件包的管理和安装。因此,在CentOS上使用dpkg可能并不是一个常规的操作。
[root@o2oa ~]# sudo yum install dpkg dpkg-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 4.4 kB 00:00* base: mirrors.aliyun.com* epel: d2lzkl7pfhq30w.cloudfront.net* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
epel | 4.3 kB 00:00
(1/3): epel/x86_64/group | 399 kB 00:00
(2/3): epel/x86_64/updateinfo | 1.0 MB 01:35
(3/3): epel/x86_64/primary_db | 8.7 MB 03:23
Resolving Dependencies
--> Running transaction check
---> Package dpkg.x86_64 0:1.18.25-10.el7 will be installed
---> Package dpkg-devel.x86_64 0:1.18.25-10.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved================================================================================Package Arch Version Repository Size
================================================================================
Installing:dpkg x86_64 1.18.25-10.el7 epel 1.3 Mdpkg-devel x86_64 1.18.25-10.el7 epel 112 kTransaction Summary
================================================================================
Install 2 PackagesTotal download size: 1.4 M
Installed size: 6.4 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/epel/packages/dpkg-1.18.25-10.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for dpkg-1.18.25-10.el7.x86_64.rpm is not installed
(1/2): dpkg-1.18.25-10.el7.x86_64.rpm | 1.3 MB 00:00
(2/2): dpkg-devel-1.18.25-10.el7.x86_64.rpm | 112 kB 00:01
--------------------------------------------------------------------------------
Total 738 kB/s | 1.4 MB 00:01
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:Userid : "Fedora EPEL (7) <epel@fedoraproject.org>"Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5Package : epel-release-7-11.noarch (@aarch64-extras)From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : dpkg-1.18.25-10.el7.x86_64 1/2Installing : dpkg-devel-1.18.25-10.el7.x86_64 2/2Verifying : dpkg-devel-1.18.25-10.el7.x86_64 1/2Verifying : dpkg-1.18.25-10.el7.x86_64 2/2Installed:dpkg.x86_64 0:1.18.25-10.el7 dpkg-devel.x86_64 0:1.18.25-10.el7Complete!
[root@o2oa ~]#