我有一个运行 Amazon Linux 2023 的 EC2 实例。我按照说明添加了 fish repo。我使用了dnf config-manager --add-repo...
,然后dnf config-manager --enable-repo...
。我还添加了g++, cmake, pcre2, gettext, gcc, pip
和任何构建类型的包。
[root@ip-172-31-24-201 /etc/yum.repos.d]# ls
amazonlinux.repo fish.repo kernel-livepatch.repo
我跑了:
[root@ip-172-31-24-201 /etc/yum.repos.d]# dnf clean all
22 files removed
[root@ip-172-31-24-201 /etc/yum.repos.d]# dnf update
Amazon Linux 2023 repository 38 MB/s | 25 MB 00:00
Amazon Linux 2023 Kernel Livepatch repository 55 kB/s | 10 kB 00:00
Fish shell - 3.x release series (CentOS_8) 27 kB/s | 18 kB 00:00
Dependencies resolved.
Nothing to do.
Complete!
当我尝试安装 FISH 时,收到以下错误:
[root@ip-172-31-24-201 ec2-user]# dnf install fish
Last metadata expiration check: 0:14:58 ago on Wed Jun 19 22:30:39 2024.
Error:
Problem: conflicting requests
- package fish-3.7.1-3.1.aarch64 from shells_fish_release_3 does not have a compatible architecture
- nothing provides /usr/libexec/platform-python needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
- nothing provides ld-linux-aarch64.so.1()(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
- nothing provides ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
- nothing provides libdl.so.2(GLIBC_2.17)(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
- nothing provides libm.so.6(GLIBC_2.17)(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
- nothing provides libpthread.so.0(GLIBC_2.17)(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
- nothing provides /usr/libexec/platform-python needed by fish-3.7.1-3.1.x86_64 from shells_fish_release_3
(try to add '--skip-broken' to skip uninstallable packages)
我没有使用ARM/aarch64
所以我运行了:
[root@ip-172-31-24-201 yum.repos.d]# dnf install fish --skip-broken
Last metadata expiration check: 0:01:27 ago on Wed Jun 19 23:02:14 2024.
Dependencies resolved.
Problem: cannot install the best candidate for the job
- nothing provides /usr/libexec/platform-python needed by fish-3.7.1-3.1.x86_64 from shells_fish_release_3
==================================================================================================================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================================================================================================================
Skipping packages with broken dependencies:
fish x86_64 3.7.1-3.1 shells_fish_release_3 4.8 M
Transaction Summary
==================================================================================================================================================================================================================
Skip 1 Package
Nothing to do.
Complete!
有人知道如何修复或安装吗/usr/libexec/platform-python
?
谢谢。
Amazon Linux 不是CentOS,这正是让您产生疑问的地方。
没什么大不了的。首先你应该问自己一个问题:一个专门为云服务量身定制的 Linux 发行版是否真的是你想要安装特定(在我看来有点深奥)面向用户的 shell 的地方。这对我来说似乎很令人惊讶!这将是我管理机器上的东西,不一定是在管理的 EC2 实例上。
是的,假设您确实想要这个:好的,那就建吧!这应该也不是什么大事。
您所需要的只是一台 Fedora 机器(我认为在 amazon Linux 本身上,等效工具并不那么容易使用,从各方面来说,它实际上都只是一个您只用来部署而不是工作的发行版,请参阅“您真的那么渴望在那上面使用您最喜欢的 shell 吗?”的讨论);它可以是本机机器、虚拟机,也可以是一个容器(只要该容器具有生成新容器的权限)。
在该 Fedora 机器上
sudo dnf install fedpkg
,通过 获取软件包源fedpkg clone fish
,然后使用 构建软件包就是这样。这个构建花了我大约 4 分钟;您将获得 .rpm 文件
results_fish/
,您可以将其复制到 amazon Linux 机器上的目录中,然后通过dnf install ./*.rpm
该目录进行安装。