Ubuntu新版没有chkconfig命令,且安装sysv-rc-conf会报以下错误:
E: Unable to locate package sysv-rc-conf
经排查,发现是因为我配置了阿里云的源,该源没有集成sysv-rc-conf的安装包。
解决方法:
先登录root账号,然后编辑source.list文件
su
vim /etc/apt/sources.list
在末尾加入一行:
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
保存后,更新源的信息:
apt update
然后就可以安装了
apt install sysv-rc-conf
附:添加chkconfig命令
cp /usr/sbin/sysv-rc-conf /usr/sbin/chkconfig chmod 755 /usr/sbin/chkconfig