在 Amazon Linux 中安装其他软件

在 Amazon Linux 中安装其他软件

我已在 Amazon Lightsail 云上创建了 Amazon Linux 实例。现在我想安装 Mosquitto buy 输入命令:

sudo yum install mosquitto

但系统找不到它。

UPD

我尝试添加 epel 存储库:

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

得到输出:

Loaded plugins: priorities, update-motd, upgrade-helper
No such command: mosquitto. Please use /usr/bin/yum --help
[ec2-user@ip-172-26-11-216 ~]$ sudo yum install mosquitto
Loaded plugins: priorities, update-motd, upgrade-helper
822 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package mosquitto.x86_64 0:1.6.7-1.el7 will be installed
--> Processing Dependency: libsystemd.so.0(LIBSYSTEMD_209)(64bit) for package: mosquitto-1
.6.7-1.el7.x86_64
--> Processing Dependency: systemd for package: mosquitto-1.6.7-1.el7.x86_64
--> Processing Dependency: systemd for package: mosquitto-1.6.7-1.el7.x86_64
--> Processing Dependency: libsystemd.so.0()(64bit) for package: mosquitto-1.6.7-1.el7.x86
_64
--> Processing Dependency: libwebsockets.so.13()(64bit) for package: mosquitto-1.6.7-1.el7
.x86_64
--> Running transaction check
---> Package libwebsockets.x86_64 0:3.0.1-2.el7 will be installed
--> Processing Dependency: libuv.so.1()(64bit) for package: libwebsockets-3.0.1-2.el7.x86_
64
---> Package mosquitto.x86_64 0:1.6.7-1.el7 will be installed
--> Processing Dependency: libsystemd.so.0(LIBSYSTEMD_209)(64bit) for package: mosquitto-1
.6.7-1.el7.x86_64
--> Processing Dependency: systemd for package: mosquitto-1.6.7-1.el7.x86_64
--> Processing Dependency: systemd for package: mosquitto-1.6.7-1.el7.x86_64
--> Processing Dependency: libsystemd.so.0()(64bit) for package: mosquitto-1.6.7-1.el7.x86
_64
--> Running transaction check
---> Package libuv.x86_64 1:1.33.0-2.el7 will be installed
---> Package mosquitto.x86_64 0:1.6.7-1.el7 will be installed
--> Processing Dependency: libsystemd.so.0(LIBSYSTEMD_209)(64bit) for package: mosquitto-1
.6.7-1.el7.x86_64
--> Processing Dependency: systemd for package: mosquitto-1.6.7-1.el7.x86_64
--> Processing Dependency: systemd for package: mosquitto-1.6.7-1.el7.x86_64
--> Processing Dependency: libsystemd.so.0()(64bit) for package: mosquitto-1.6.7-1.el7.x86
_64
--> Finished Dependency Resolution
Error: Package: mosquitto-1.6.7-1.el7.x86_64 (epel)
           Requires: libsystemd.so.0()(64bit)
Error: Package: mosquitto-1.6.7-1.el7.x86_64 (epel)
           Requires: libsystemd.so.0(LIBSYSTEMD_209)(64bit)
Error: Package: mosquitto-1.6.7-1.el7.x86_64 (epel)
           Requires: systemd
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

答案1

如果你想安装一个带有 的包yum,它必须在你的一个存储库中可用,但显然情况并非如此。然而在他们的网站上我没有看到任何rpm存储库(仅适用于 debian)。因此,在这种情况下,我认为您必须使用以下命令手动安装它二进制安装。

答案2

您必须正确添加repository.首先,您可以尝试添加epel存储库。尝试一下sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm,现在可以打字了sudo yum install epel-release。然后运行更新并重试安装您的软件。如果仍然找不到,那么您至少有三个解决方案:
- 搜索该软件所属的存储库(如果由供应商提供)。通过这种方法,如果有新软件发布,您可以直接从 yum 获取更新。 - 下载并手动安装与软件相关的 RPM - 从源代码编译。

相关内容