当前位置:首页 > 技术杂谈 > 正文

报错:shell-init: error retrieving current directory: getcwd: c

2024-03-31 技术杂谈

[[email protected] php]# /etc/init.d/httpd restart
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

该错误表示 getcwd 命令无法定位到当前工作目录。一般来说是因为你 cd 到了某个目录之后 rm 了这个目录,这时去执行某些 service 脚本的时候就会报 getcwd 错误。只需要 cd 到任何一个实际存在的目录下在执行命令即可。

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/a/22953.html