如何解决内存中的PM2已经过期的问题

问题描述 投票:5回答:1

亚马逊AWS Ubuntu服务器

~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial

问题:PM2已经过期

$ pm2 list

>>>> In-memory PM2 is out-of-date, do:
>>>> $ pm2 update
In memory PM2 version: 2.4.6
Local PM2 version: 3.0.3

尝试过

pm2 update

...在我重启前都能用

尝试过

npm remove pm2 -g
which pm2 
npm install pm2@latest -g
which pm2
sudo reboot

有什么建议吗?

ubuntu-16.04 pm2
1个回答
0
投票

我也有同样的问题,只要重新创建启动脚本就能解决。试试下面的步骤。

  • 删除当前进程
    pm2 delete nameOfProcess
    
  • 卸载当前启动脚本
    pm2 unstartup systemd
    
  • 更新 pm2
    pm2 update
    
  • 启用启动脚本
    pm2 startup //copy paste the output
    
  • 重启
    pm2 start nameOfProcess
    
  • 保存当前配置
    pm2 save
    
© www.soinside.com 2019 - 2024. All rights reserved.