Search code examples
linuxshellamazon-web-servicesfish

How do I install Fish Shell on AWS Linux


I can't seem to install Fish shell on an AWS Linux instance. I keep getting the following error and can't seem to find a fix for it.

[root@ip-172-31-20-125 ec2-user]# yum -y install fish
Loaded plugins: priorities, update-motd, upgrade-helper
Repository shells_fish_release_2 is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
---> Package fish.x86_64 0:2.5.0-1.2 will be installed
--> Processing Dependency: hostname for package: fish-2.5.0-1.2.x86_64
--> Finished Dependency Resolution
Error: Package: fish-2.5.0-1.2.x86_64 (shells_fish_release_2)
           Requires: hostname
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Solution

  • Same way as on Centos 6.

    from:

    cd /etc/yum.repos.d/
    wget http://download.opensuse.org/repositories/shells:fish:release:2/CentOS_6/shells:fish:release:2.repo
    yum install fish
    

    2021 update:

    If you're running a newer version of AWS Linux - run rpm -E %{rhel} to see the RHEL version, and then use one of the links here for the wget command. For instance, if the RHEL version is 7, run as root:

    cd /etc/yum.repos.d/
    wget --no-check-certificate https://download.opensuse.org/repositories/shells:fish:release:3/CentOS_7/shells:fish:release:3.repo
    yum install fish