我似乎无法在AWS Linux实例上安装Fish shell。我一直收到以下错误,似乎无法找到解决方法。
[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
答案 0 :(得分:6)
与Centos 6相同。
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
答案 1 :(得分:1)
sudo yum-config-manager --add-repo http://fishshell.com/files/linux/RedHat_RHEL-6/fish.release:2.repo
sudo yum -y install fish
答案 2 :(得分:0)
这对我的发行版很有效:
cat /etc/os-release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
添加回购
sudo yum-config-manager --add-repo http://fishshell.com/files/linux/RedHat_RHEL-6/fish.release:2.repo
干净
sudo yum clean all
安装
sudo yum -y install fish
测试
[ec2-user@ip-xxx-xx-x-xx] yum.repos.d]$ fish
Welcome to fish, the friendly interactive shell