在 etc/init 中我放了一个 .conf 文件:
# -*- upstart -*-
# Upstart configuration script for WordVectServer
description "WordVectServer"
kill timeout 5
pre-start script
mkdir -p /var/log/wordvecServer/
sleep 10
end script
exec sudo WordVectServer server /home/marco/WVLoader/src/G.bin >>
/var/log/wordvecServer/wordvecServer.log
start on runlevel [2345]
并使其可执行
sudo chmod +x wordvecServer.conf
但是当尝试启动执行时:
marco@PC:/etc/init$ sudo start sudo chmod +x wordvectServer
[sudo] password for marco:
start: Unable to connect to Upstart: Failed to connect to socket
/com/ubuntu/upstart: Connection refused
marco@PC:~$ sudo apt-get install upstart
Reading package lists... Done
Building dependency tree
Reading state information... Done
upstart is already the newest version (1.13.2-0ubuntu21.1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
那么...该怎么做才能解决这个问题?有什么提示吗?期待您的帮助。Marco