/usr/bin/env: ruby -ws: No such file or directory
程序员文章站
2022-03-08 20:37:40
...
要写个用ruby写的程序的启动脚本,脚本是这样的:
其实是shell代码。。。
#!/bin/sh
#
# Startup script for css
#
# chkconfig: - 85 15
# description: cssd server
# processname: css
#
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
echo -n "Starting css: "
if [ -f /var/lock/subsys/css ] ; then
echo
exit 1
fi
`ruby root/release/1.0.9_B201104011000/CSSD/1.1/bin/server start`
echo
touch /var/lock/subsys/css
;;
stop)
echo -n "Shutting down css: "
`ruby /root/release/1.0.9_B201104011000/CSSD/1.1/bin/server stop` 2> /dev/null #作个弊
echo
rm -f /var/lock/subsys/css
;;
status)
status css
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit 0
这是pptp的启动脚本,剽窃了一下。剽窃的很烂。yuan同学,是吧
执行的时候出现如下错误
/usr/bin/env: ruby -ws: No such file or directory
在要执行的程序前加上了ruby ruby_command
这下报错是“/etc/init.d/css: line 27: ruby: command not found”
添加了一个连接:ln -s /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby /sbin/ruby
执行继续报错:Shutting down css: /etc/init.d/css: line 27: CSS-Deliver:: command not found
yuan同学你猜这样下去的结果是什么?
上一篇: “机器换人”后10亿产值仅需350人
下一篇: 二维数组作为形参--传值的3三种方式
推荐阅读
-
bash: /usr/bin/autocrorder: /usr/bin/python^M: bad interpreter: No such file or directory
-
【openWRT】编译问题/usr/bin/env: node: No such file or directory
-
【/usr/bin/env: node: No such file or directory】 的解决办法
-
Python Error: /usr/bin/env: python3: No such file or directory
-
报错:/usr/bin/env: php: No such file or directory
-
- bash: /usr/bin/ls: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory
-
CUDA 问题解决 —nvcc -V bash: /usr/bin/nvcc: No such file or directory
-
linux 安装phpunit5 报错 /usr/bin/env :php: No such file or directory
-
error: unable to invoke subcommand: /usr/bin/swift-build (No such file or directory)
-
linux composer centos7 /usr/bin/env: php: No such file or directory