0

I have an EC2 instance running Amazon Linux 2023. I added the fish repo per the instructions. I used dnf config-manager --add-repo... and then dnf config-manager --enable-repo.... I also added g++, cmake, pcre2, gettext, gcc, pip and any build-type packages.

[root@ip-172-31-24-201 /etc/yum.repos.d]# ls

amazonlinux.repo  fish.repo  kernel-livepatch.repo

I ran:

[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!

When I try to install FISH, I receive the following errors:

[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)

I'm not using ARM/aarch64 so I ran:

[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!

Does anyone know how to fix this or install /usr/libexec/platform-python?

thanks.

1 Answer 1

0

Amazon Linux is not CentOS, and that's exactly what's hitting you here.

No big deal. First question you should ask yourself whether a specifically cloud-service-tailored Linux distro is actually what you want to install a specific (and slightly esoteric, imho) user-facing shell on. Seems surprising to me! Would be something I'd have on my administration machine, not necessarily on the administrated EC2 instances.

Assuming that, yes, you are positive you want that: OK, so build it! Should also not be a big deal.

All you need is a Fedora machine (I don't think the equivalent tooling is as easy to use on amazon linux itself, it's really in all senses a distro that you just deploy to, not work on, see the discussion of "do you really want your favorite shell on that so badly?"); that can be a native machine, a VM, or it could be a container (as long as that container has the privileges to spawn new containers).

On that fedora machine, sudo dnf install fedpkg, then get the package sources via fedpkg clone fish, then simply build the package using

cd fish
fedpkg mockbuild --root /etc/mock/amazonlinux-2023-x86_64.cfg 

That's it. That build took me about 4 minutes; you get .rpm files under results_fish/, which you can copy to a directory on your amazon Linux machine and install via dnf install ./*.rpm from that directory.

4
  • I get the same result if I use the Fedora40 repo: dnf config-manager --add-repo https://download.opensuse.org/repositories/shells:fish/Fedora_40/shells:fish.repo. I'll try and build it per your instruction and report back.
    – chuckd833
    Commented Jun 20 at 13:54
  • 1
    @chuckd833 that's the opposite of what I said you should do. Commented Jun 20 at 15:13
  • You said AL2023 is not CentOS. I was pointing out I had already tried Fedora 40 (since that is what AL2023 is forked from) and it didn't work on that either. So it is not a CentOS issue. I built it per your instructions and it worked Thanks
    – chuckd833
    Commented Jun 23 at 16:15
  • @chuckd833 nowhere in my instructions did I say you should install fish from Fedora repos. I explained exactly how you can build an amazon linux package, exactly because Amazon Linux is Amazon Linux and not centos, fedora, Suse, the USS Zumwalt or anything else. Commented Jun 23 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .