pm2初始化服务器项目结构时报错/usr/bin/env: bad interpreter: No such file or directory

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pm2初始化服务器项目结构时报错/usr/bin/env: bad interpreter: No such file or directory相关的知识,希望对你有一定的参考价值。

参考技术A 运行命令pm2 deploy ecosystem.json production setup时出现如下图所示错误

通过查找资料发现是因为windows系统和linux系统对换行符的解析不同导致的,对应的解决方案一般都是去修改报错的文件。现在给出另外一种解决方案, 用git bash运行同样的命令即可 (因为git bash可以完美的在windows上运行linux命令,自然也就不存在换行符的解析问题了)。

pip 安装包时报错 /usr/bin/pip: No such file or directory

在ubuntu中使用pip报一下错误:
/usr/bin/pip: No such file or directory pip can no longer be found:

可以采用以下方式解决

  • which pip
    /usr/local/bin/pip

  • pip
    -su: /usr/bin/pip: No such file or directory

  • type pip
    pip is hashed (/usr/bin/pip)
    So pip is definintely in /usr/local/bin/pip but it is been cached as in /usr/bin/pip, thanks to the Stackoverflow question, the solution is very simple:

  • hash -r
    When the cache is clear, pip is working again.

这样之后在进行操作,就可以使用pip了。

以上是关于pm2初始化服务器项目结构时报错/usr/bin/env: bad interpreter: No such file or directory的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu12.04下编译时报错:dbus/dbus-glib.h:没有那个文件或目录,但是在/usr/include/dbus-1.0/dbus中有

初始化mysql数据库 /usr/bin/mysql_install_db执行时报错

嘿嘿!报错不断呀!快哉快哉,检测nginx配置文件时报错,整它!

pycharm新建django项目时报错

在linux下安装nginx时报出./configure: error: invalid option "–prefix=/usr/webserver/ngi

VS2010在新建项目时报错,错误提示为如图所示:Access to the path 'c:/windows。。。