sudo apt-get autoremove的补救

由于linux上cmake版本较低需要更新,参考了https://blog.csdn.net/ykwjt/article/details/88353622,使用了坑爹的apt-get autoremove命令卸载老版本cmake(如下命令)

sudo apt-get autoremove cmake

导致cmake的一堆依赖都被卸载,再重新按照该博文安装cmake出现大量报错。其实没必要执行这一步,按照博文的其他步骤直接安装新版本即可

补救方法:
https://zhuanlan.zhihu.com/p/160926980

sudo vim /var/log/apt/history.log

执行上述命令找到如下内容可以看到卸载cmake时同时卸载的包,重新一个一个的sudo apt-get install

Start-Date: 2021-05-11  10:18:22
Commandline: apt-get autoremove cmake
Requested-By: shaorenjie (995)
Remove: linux-modules-extra-4.15.0-140-generic:amd64 (4.15.0-140.144~16.04.1), cmake-data:amd64 (3.5.1-1ubuntu3), linux-headers-4.15.0-45:amd64 (4.15.0-45.48~16.04.1), linux-modules-extra-4.15.0-45-generic:amd64 (4.15.0-45.48~16.04.1), linux-headers-4.15.0-137-generic:amd64 (4.15.0-137.141~16.04.1), linux-headers-4.15.0-136-generic:amd64 (4.15.0-136.140~16.04.1), linux-modules-4.15.0-45-generic:amd64 (4.15.0-45.48~16.04.1), linux-modules-4.15.0-136-generic:amd64 (4.15.0-136.140~16.04.1), linux-headers-4.15.0-45-generic:amd64 (4.15.0-45.48~16.04.1), linux-image-4.15.0-137-generic:amd64 (4.15.0-137.141~16.04.1), linux-headers-4.15.0-139-generic:amd64 (4.15.0-139.143~16.04.1), linux-image-4.15.0-136-generic:amd64 (4.15.0-136.140~16.04.1), linux-image-4.15.0-139-generic:amd64 (4.15.0-139.143~16.04.1), linux-headers-4.15.0-140-generic:amd64 (4.15.0-140.144~16.04.1), linux-modules-4.15.0-137-generic:amd64 (4.15.0-137.141~16.04.1), cmake:amd64 (3.5.1-1ubuntu3), linux-modules-4.15.0-140-generic:amd64 (4.15.0-140.144~16.04.1), linux-headers-4.15.0-136:amd64 (4.15.0-136.140~16.04.1), linux-headers-4.15.0-137:amd64 (4.15.0-137.141~16.04.1), linux-headers-4.15.0-139:amd64 (4.15.0-139.143~16.04.1), linux-headers-4.15.0-140:amd64 (4.15.0-140.144~16.04.1), linux-modules-extra-4.15.0-137-generic:amd64 (4.15.0-137.141~16.04.1), linux-image-4.15.0-140-generic:amd64 (4.15.0-140.144~16.04.1), libjsoncpp1:amd64 (1.7.2-1), linux-modules-4.15.0-139-generic:amd64 (4.15.0-139.143~16.04.1), linux-modules-extra-4.15.0-136-generic:amd64 (4.15.0-136.140~16.04.1), linux-modules-extra-4.15.0-139-generic:amd64 (4.15.0-139.143~16.04.1), linux-image-4.15.0-45-generic:amd64 (4.15.0-45.48~16.04.1)
End-Date: 2021-05-11  10:18:51

Start-Date: 2021-05-11  10:20:09
Commandline: apt-get install cmake
Requested-By: shaorenjie (995)
Install: cmake-data:amd64 (3.5.1-1ubuntu3, automatic), cmake:amd64 (3.5.1-1ubuntu3), libjsoncpp1:amd64 (1.7.2-1, automatic)
End-Date: 2021-05-11  10:20:11

  • 10
    点赞
  • 31
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值