Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Fish Shell on AWS Linux [closed]

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
like image 612
Devin St. Clair Avatar asked Mar 17 '17 04:03

Devin St. Clair


People also ask

How do you activate a fish shell?

If you wish to use fish (or any other shell) as your default shell, you need to enter your new shell's executable /usr/local/bin/fish in two places: add /usr/local/bin/fish to /etc/shells. change your default shell with chsh -s to /usr/local/bin/fish.

How do I run a fish shell script?

To be able to run fish scripts from your terminal, you have to do two things. Add the following shebang line to the top of your script file: #!/usr/bin/env fish . Mark the file as executable using the following command: chmod +x <YOUR_FISH_SCRIPT_FILENAME> .


2 Answers

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 https://download.opensuse.org/repositories/shells:fish:release:3/CentOS_7/shells:fish:release:3.repo
yum install fish
like image 60
at0mzk Avatar answered Oct 03 '22 05:10

at0mzk


You can use Fish's Red Hat 6 package repository, which works out fine for Amazon Linux 2:

sudo yum-config-manager --add-repo http://fishshell.com/files/linux/RedHat_RHEL-6/fish.release:2.repo

After that you can install it normally.

sudo yum -y install fish
like image 20
user1063192 Avatar answered Oct 03 '22 06:10

user1063192