没有可用的程序包管理器Amazon Linux 2

时间:2018-11-04 18:31:16

标签: supervisor amazon-linux

我想在Amazon Linux 2中使用主管程序包管理器运行ASP.Net Core应用程序。执行以下命令以安装主管程序

$ sudo yum安装主管

它说:

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package supervisor available.
Error: Nothing to do

Os详细信息:

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

也尝试过

$sudo yum install epel-release

相同错误:

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package epel-release available.
Error: Nothing to do

2 个答案:

答案 0 :(得分:6)

epel-release在Amazon Linux Extra主题“ epel”中可用

$sudo amazon-linux-extras install epel

然后我尝试了

$sudo yum install supervisor

输出!

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
150 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package supervisor.noarch 0:3.1.4-1.el7 will be installed
--> Processing Dependency: python-meld3 >= 0.6.5 for package: supervisor-3.1.4-1.el7.noarch
--> Running transaction check
---> Package python-meld3.x86_64 0:0.6.10-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                      Arch                                                   Version                                                      Repository                                            Size
=============================================================================================================================================================================================================================================
Installing:
 supervisor                                                   noarch                                                 3.1.4-1.el7                                                  epel                                                 446 k
Installing for dependencies:
 python-meld3                                                 x86_64                                                 0.6.10-1.el7                                                 epel                                                  73 k

Transaction Summary
=============================================================================================================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 519 k
Installed size: 2.5 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/2/epel/packages/python-meld3-0.6.10-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for python-meld3-0.6.10-1.el7.x86_64.rpm is not installed
(1/2): python-meld3-0.6.10-1.el7.x86_64.rpm                                                                                                                                                                           |  73 kB  00:00:00
(2/2): supervisor-3.1.4-1.el7.noarch.rpm                                                                                                                                                                              | 446 kB  00:00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                        1.5 MB/s | 519 kB  00:00:00
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 64e5
 Package    : epel-release-7-11.noarch (@amzn2extra-epel)
 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 transaction
  Installing : python-meld3-0.6.10-1.el7.x86_64                                                                                                                                                                                          1/2
  Installing : supervisor-3.1.4-1.el7.noarch                                                                                                                                                                                             2/2
  Verifying  : python-meld3-0.6.10-1.el7.x86_64                                                                                                                                                                                          1/2
  Verifying  : supervisor-3.1.4-1.el7.noarch                                                                                                                                                                                             2/2

Installed:
  supervisor.noarch 0:3.1.4-1.el7

Dependency Installed:
  python-meld3.x86_64 0:0.6.10-1.el7

Complete!

答案 1 :(得分:-1)

标准存储库可能未提供可以在CentOS,Red Hat Enterprise Linux(RHEL)或基于Amazon Linux的发行版上安装的所有软件包。

在RHEL 7和Amazon Linux 2上安装并启用EPEL rpm软件包

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

在RHEL 6上安装并启用EPEL rpm软件包

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

现在您可以运行:

sudo yum install supervisor

更多信息: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/