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 无法找到路径问题]的更多相关文章

  1. /sbin/insserv: No such file or directory

    /sbin/insserv: No such file or directory在Ubuntu下安装service服务,可能会报如下错误:/sbin/insserv: No such file or ...

  2. 怎样解决Ubuntu发热严重地问题

    刚装ubuntu的时候那是相当地热,hot.直接地原因是没有对应地显卡驱动,然后在software update里面找到Nivida地最新驱动,兴高採烈地装上试一试.一点用处没有! 在网上搜了搜,有一 ...

  3. 解决Ubuntu系统中文乱码显示问题,终端打开文件及查看目录

    解决Ubuntu系统中文乱码显示问题 [日期:2014-02-20] 来源:Linux社区  作者:njchenyi [字体:大 中 小]   我是先安装了Ubuntu 12.04 Server,然后 ...

  4. Ubuntu系统---又显示nvidia-smi 未找到命令

    Ubuntu系统---又显示nvidia-smi 未找到命令 本来nvidia驱动+CUDA安装好用,两次遇到开机发现字体异常,不用合计,是显卡驱动的问题.一查,确实是nvidia-smi 未找到命令 ...

  5. 解决 Ubuntu 无法使用 root 用户进行 ssh 远程登陆

    解决 Ubuntu 无法使用 root 用户进行 ssh 远程登陆 操作系统 Ubuntu 20.04.2 LTS 一.修改sshd配置文件 //打开 /etc/ssh/sshd_config 配置文 ...

  6. 解决Ubuntu 下 vi编辑器不能使用方向键和退格键问题

    转自:http://blog.csdn.net/sky101010ws/article/details/51012103 使用vi命令时,不能正常编辑文件,使用方向键时老是出现很多字母 这个问题主要是 ...

  7. 解决Ubuntu 12.10中ZIP文件名乱码的方法

    转摘源地址:http://blog.csdn.net/jiangxinyu/article/details/8206395 安装(12.04及以上): 代码: sudo apt-get install ...

  8. 解决ubuntu中zip解压的中文乱码问题

    转自解决ubuntu中zip解压的中文乱码问题 在我的ubuntu12.10中,发现显示中文基本都是正常的,只有在解压windows传过来的zip文件时,才会出现乱码.所以,我用另一个方法解决中文乱码 ...

  9. 解决Ubuntu和Windows的文件乱码问题(转载)

    解决Ubuntu和Windows的文件乱码问题(debian也通用) 1.转换文件内容编码   Windows下天生的纯文本文件,其中文编码为GBK,在Ubuntu下显示为乱码,可以使用iconv命令 ...

随机推荐

  1. Js 向json对象中添加新元素

    即:var json={a:1,b:2} json.c=3  添加新元素直接使用赋值就行了

  2. Luogu P1608 路径统计 最短路计数

    颓了...重边导致我乖乖用邻接矩阵.... 好吧就是个最短路计数....如果更新时d[v]==d[u]+w[i],就可以接起来,把两个加在一起.. 如果d[v]>d[u]+w[i],那么c[v] ...

  3. linux 底层 基础命令 路径信息

    z基础命令: 打印 :echo "hello world“ 切换目录   cd  / 显示当前路径     pwd 显示 目录下所有文件     ls 显示所有文件包括隐藏文件    ls ...

  4. Codeforces Round #339 (Div. 2) A

    Description Programmer Rostislav got seriously interested in the Link/Cut Tree data structure, which ...

  5. 通过JS,按照原比例控制图片尺寸

    <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Con ...

  6. 查看linux系统各种参数配置的命令

    查看linux系统各种参数配置的命令 last |grep shutdown                             //查看上次关机时间 last |grep reboot     ...

  7. github 0 学习

    Github 快速上手实战教程 一.实验介绍 1.1 实验内容 本次课程讲的是在实验楼的在线环境中,如何使用 Github 去管理在在线环境中使用的代码.配置.资源等实验相关文件,怎样去添加.同步和下 ...

  8. 未来HTML6出现的10个特性

    网络技术正趋向于发展为一个巨大的移动APP市场,在Web开发的革命浪潮中起着指示性作用,自HTML引入以来,创建可转换,有新意的网络移动应用程序变得So easy,web开发中运用先进技术也很容易处理 ...

  9. python xml dom

    http://www.cnblogs.com/coser/archive/2012/01/10/2318298.html

  10. Cinder Columns

    http://www.screencast.com/users/xiangxinyong/folders/Smaug http://www.screencast.com/t/SLqCyOwtBRl