针对你提出的问题“sudo: pm2: command not found”,这里提供一些可能的解决方案。首先,我们需要确认pm2是否已正确安装,并检查环境变量配置。以下是详细的步骤: 1. 确认pm2是否已经正确安装 如果尚未安装pm2,可以通过以下命令进行全局安装: bash npm install -g pm2 安装完成后,可以尝试直接运行pm2命令来检查是否安...
Back up your computer. On the command line, in your home directory, create a directory for global installations: mkdir~/.npm-global Configure npm to use the new directory path: On the command line, update your system variables:
sudo ln -s /home/data/node-v6.2.2-linux-x64/bin/npm /usr/bin/npm sudo ln -s /home/data/node-v6.2.2-linux-x64/bin/pm2 /usr/bin/pm2 1. 2. 3.