解决ubuntu的chkconfig[/sbin/insserv 无法找到路径问题]
http://www.cnblogs.com/lost-1987/archive/2012/10/17/2727285.html
今天在虚拟机里做DRBD实验,使用chkconfig管理服务的时候,出现了问题。
root@node2:/root# chkconfig --list | grep drbd
drbd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
root@node2:/root# chkconfig drbd on
/sbin/insserv: No such file or directory
这是Ubuntu 12.04的一个BUG,使用以下方法可以解决
root@node2:/root# whereis insserv
insserv: /etc/insserv /etc/insserv.conf /usr/lib/insserv /usr/share/insserv /usr/share/man/man8/insserv.8.gz
把上面找到的目录,一个一个的看一遍,发现文件在/usr/lib/里面
root@node2:/root# ls -l /usr/lib/insserv/
total 56
-rwxr-xr-x 1 root root 56368 Apr 9 19:07 insserv
然后我就做了个连接过去
root@node2:/root# ln -s /usr/lib/insserv /sbin/insserv
root@node2:/root# chkconfig drbd on
/sbin/insserv: Permission denied
从上面看出,报了一个权限不允许,很郁闷
root@node2:/root# ls -l /sbin/insserv
lrwxrwxrwx 1 root root 16 Jun 21 04:27 /sbin/insserv -> /usr/lib/insserv
root@node2:/root# ls -l /usr/lib/insserv
total 56
-rwxr-xr-x 1 root root 56368 Apr 9 19:07 insserv
从上面看出,有权限的啊,好郁闷,最后发现 /usr/lib/insserv竟然是一个目录
root@node2:~# cd /usr/lib/insserv/
root@node2:/usr/lib/insserv# pwd
/usr/lib/insserv
root@node2:/usr/lib/insserv# ls
insserv
然后就好解决了
root@node2:/usr/lib/insserv# rm -rf /sbin/insserv
root@node2:/usr/lib/insserv# ln -s /usr/lib/insserv/insserv /sbin/insserv
root@node2:/usr/lib/insserv# chkconfig drbd on
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'friendly-recovery' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `friendly-recovery'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `friendly-recovery'
报了一堆的其它错误,先不管吧,看看服务OK没
root@node2:/usr/lib/insserv# chkconfig --list | grep drbd
drbd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
root@node2:/usr/lib/insserv#
OK,现在看到服务已经搞定了。Ubuntu还是有Bug的,呵呵,好像还挺多。以前总是玩RedHat,没发现类似的问题。
解决ubuntu的chkconfig[/sbin/insserv 无法找到路径问题]的更多相关文章
- /sbin/insserv: No such file or directory
/sbin/insserv: No such file or directory在Ubuntu下安装service服务,可能会报如下错误:/sbin/insserv: No such file or ...
- 怎样解决Ubuntu发热严重地问题
刚装ubuntu的时候那是相当地热,hot.直接地原因是没有对应地显卡驱动,然后在software update里面找到Nivida地最新驱动,兴高採烈地装上试一试.一点用处没有! 在网上搜了搜,有一 ...
- 解决Ubuntu系统中文乱码显示问题,终端打开文件及查看目录
解决Ubuntu系统中文乱码显示问题 [日期:2014-02-20] 来源:Linux社区 作者:njchenyi [字体:大 中 小] 我是先安装了Ubuntu 12.04 Server,然后 ...
- Ubuntu系统---又显示nvidia-smi 未找到命令
Ubuntu系统---又显示nvidia-smi 未找到命令 本来nvidia驱动+CUDA安装好用,两次遇到开机发现字体异常,不用合计,是显卡驱动的问题.一查,确实是nvidia-smi 未找到命令 ...
- 解决 Ubuntu 无法使用 root 用户进行 ssh 远程登陆
解决 Ubuntu 无法使用 root 用户进行 ssh 远程登陆 操作系统 Ubuntu 20.04.2 LTS 一.修改sshd配置文件 //打开 /etc/ssh/sshd_config 配置文 ...
- 解决Ubuntu 下 vi编辑器不能使用方向键和退格键问题
转自:http://blog.csdn.net/sky101010ws/article/details/51012103 使用vi命令时,不能正常编辑文件,使用方向键时老是出现很多字母 这个问题主要是 ...
- 解决Ubuntu 12.10中ZIP文件名乱码的方法
转摘源地址:http://blog.csdn.net/jiangxinyu/article/details/8206395 安装(12.04及以上): 代码: sudo apt-get install ...
- 解决ubuntu中zip解压的中文乱码问题
转自解决ubuntu中zip解压的中文乱码问题 在我的ubuntu12.10中,发现显示中文基本都是正常的,只有在解压windows传过来的zip文件时,才会出现乱码.所以,我用另一个方法解决中文乱码 ...
- 解决Ubuntu和Windows的文件乱码问题(转载)
解决Ubuntu和Windows的文件乱码问题(debian也通用) 1.转换文件内容编码 Windows下天生的纯文本文件,其中文编码为GBK,在Ubuntu下显示为乱码,可以使用iconv命令 ...
随机推荐
- python 对三维CT数据缩放
项目需要对CT数据进行缩放,这里我存储CT数据的格式是numpy数组. 一共尝试了三种方法,分别是numpy.resize,cv2.resize,scipy.ndimage.interpolation ...
- 富文本编辑器...quill 的使用放...
移动端 quill 时候用的 是 div 而不是 textarea.... 引入 dom <link href="//cdn.quilljs.com/1.3.6/quill.snow. ...
- spring 配置 junit
package cn.hefen.mall.app; import cn.hefen.mall.app.model.ResultMap; import cn.hefen.mall.app.model. ...
- Luogu P1471 方差 线段树
那是上上周...也是重构了四遍...后来GG了...今天又拾起,搞了搞终于过了... 好吧就是个线段树,公式懒得推了https://www.cnblogs.com/Jackpei/p/10693561 ...
- getResourceAsStream properties
try (InputStream is = getClass().getResourceAsStream("/test.properties")) { Properties pro ...
- python3 提取http请求response中的某个值
在使用python3 request做接口测试的时候,想获取response的json中的某个值做断言时,发现request好像没有相关的方法 所以只好自己找写一个了.在我看来,json就是一个字典, ...
- 1.1 Go安装与项目结构初始化
软件安装安装包下载地址为:https://golang.org/dl/ 如果打不开可以: https://golang.google.cn/dl/ https://dl.google.com/go/g ...
- XAMPP 更换其它路径
打开安装路径: xampp\apache\conf\httpd.conf DocumentRoot “C:/xampp/htdocs” <Directory “C:/xampp/htdocs”& ...
- Head First 设计模式笔记(模版方法模式)
1.定义: 在一个方法中定义一个算法骨架,而将一些步骤延迟到子类中.模版方法使得子类可以在不改变算法结构的情况下,重新定义算法中的某些步骤. 2.类图: 3.说明: 模版方法可以理解为一个方法里面包 ...
- gitee 搭建自己的代码仓库
git是什么? 还是科普一下吧:Git是一个开源的分布式版本控制系统,可以有效.高速的处理从很小到非常大的项目版本管理(来自我大百度) 现在越来越多的公司已经使用git来进行项目的版本管理,,使用起来 ...