【问题标题】:How to resolve In-memory PM2 is out-of-date如何解决 In-memory PM2 is out-of-date
【发布时间】:2020-06-11 00:38:55
【问题描述】:

亚马逊 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】:

    我遇到了同样的问题,可以通过重新创建启动脚本来解决。请尝试以下步骤:

    • 删除当前进程
      pm2 delete nameOfProcess
      
    • 卸载当前启动脚本
      pm2 unstartup systemd
      
    • 更新 pm2
      pm2 update
      
    • 启用启动脚本
      pm2 startup //copy paste the output
      
    • 再次启动进程
      pm2 start nameOfProcess
      
    • 保存当前配置
      pm2 save
      

    【讨论】:

    • 所有这些 + rm -rf /home/ec2-user/.pm2 ec2-user 是您的当前用户
    • @Shirker rm -rf /home/ec2-user/.pm2 在我的情况下对于Ubuntu 20.04.2 LTSpm2@5.1.0 是不必要的
    猜你喜欢
    • 1970-01-01
    • 2019-06-18
    • 1970-01-01
    • 2020-09-24
    • 1970-01-01
    • 2020-05-22
    • 2021-02-28
    • 1970-01-01
    • 2015-07-14
    相关资源
    最近更新 更多