在ubuntu18.04上安装saltstack,解决安装报错的问题

在ubuntu18.04上安装saltstack,会报错安装报错如下:

1. 按官网的说明,添加源后apt update,再安装,此时报错说i386不支持

root@ubuntu18-ip54:~# cat /etc/apt/sources.list.d/saltstack.list

deb  http://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest bionic main

解决方法是

root@ubuntu18-ip54:~# cat /etc/apt/sources.list.d/saltstack.list

deb [arch=amd64]  http://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest bionic main

此时再apt update 后 install  salt-minion,仍然报错:

The following packages have unmet dependencies:

salt-minion : Depends: python-zmq (>= 14.4.0) but it is not installable

              Depends: salt-common (= 2018.3.3+ds-2) but it is not going to be installed

              Recommends: debconf-utils but it is not installable

E: Unable to correct problems, you have held broken packages.

当前配置是:

root@ubuntu18-ip54:~# cat /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu bionic main

deb http://archive.ubuntu.com/ubuntu bionic-security main

deb http://archive.ubuntu.com/ubuntu bionic-updates main

root@ubuntu18-ip54:~# cat /etc/apt/sources.list.d/saltstack.list

deb [arch=amd64]  http://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest bionic main

解决方法:修改 /etc/apt/sources.list,为:

root@ubuntu18:/etc/apt# cat sources.list

#deb http://archive.ubuntu.com/ubuntu bionic main

#deb http://archive.ubuntu.com/ubuntu bionic-security main

#deb http://archive.ubuntu.com/ubuntu bionic-updates main

deb http://archive.ubuntu.com/ubuntu/ bionic main restricted

deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted

deb http://archive.ubuntu.com/ubuntu/ bionic universe

deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe

deb http://archive.ubuntu.com/ubuntu/ bionic multiverse

deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse

deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted

deb http://security.ubuntu.com/ubuntu/ bionic-security universe

deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse

root@ubuntu18:/etc/apt# cat sources.list.d/saltstack.list

root@ubuntu18-ip54:~# cat /etc/apt/sources.list.d/saltstack.list

deb [arch=amd64]  http://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest bionic main

修改源后,再执行 apt  update,之后就能  install 成功了。

完毕!

你可能感兴趣的:(在ubuntu18.04上安装saltstack,解决安装报错的问题)