1、initctl: 无法连接到 Upstart: Failed to connect to socket /com/ubuntu/upstart: 拒绝连接
Docker Failed to connect to socket /com/ubuntu/upstart: Connection refused
解决:You can workaround this by doing:
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
第一个在网上查的“使用文件转移(diversions)的方法可以强令 dpkg 将文件安装到 转移 目录而非默认目录。对于某个引起冲突的文件, 可以在 Ubuntu 软件包脚本中使用 Diversions 将它安装到别的目录。系统管理员还可以使用 diversion 来重载软件包配置文件, 或者用来保留某些旧配置文件(这些文件没有在 conffiles 中登记)当安装新版软件时这些文件会被覆盖”
第2个是建立个软连接。。。2、在1的基础上之后:
huan@huan-Lenovo-G480:~/iot/deb$ sudo dpkg -i kaa-node-*.deb
(正在读取数据库 ... 系统当前共安装有 180294 个文件和目录。)
正准备解包 kaa-node-0.10.0.deb ...
正在将 kaa-node (0.10.0) 解包到 (0.10.0) 上 ...
正在设置 kaa-node (0.10.0) ...
insserv: warning: script 'mongod' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `mongod'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `mongod'
解决方法:
方法一:
insserv: warning: script 'da-popb4smtp' missing LSB tags and overrides
insserv: warning: script 'directadmin' missing LSB tags and overrides
insserv: warning: script 'mysqld' missing LSB tags and overrides
insserv: warning: script 'httpd' missing LSB tags and overrides
insserv: warning: script 'startips' missing LSB tags and overrides
insserv: warning: script 'dovecot' missing LSB tags and overrides
apt-get remove insserv
If you wish to just add your own tags, edit the mentioned boot scripts, and add them.
For example, /etc/init.d/dovecot would have something like this near the top, somewhere after the #!/bin/sh line:
### BEGIN INIT INFO
# Provides: dovecot
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: dovecot
# Description: dovecot pop & imap daemon
### END INIT INFO
The descriptions can be any basic text.
方法二:The easiest way to fix the warning, is to copy the LSB tags from the skeleton
script to the beginning of your mathkernel
script and just change skeleton
to mathkernel
.