许多最新版本的软件无法通过 apt 安装,只能到官网上下包
包下载之后又大多需要 make install 来安装。
make install 安装后卸载是非常麻烦的。
在 ubuntu 下可以用 checkinstall
来代替 make install
。
checkinstall
会在安装的同时追踪安装过程,最终生成一个 .deb 文件,之后可以方便的通过包管理器来删除安装的包。
以 php 7.2 为例
使用check install
成功安装后会生成如下输出:
Done. The new package has been installed and saved to
/home/ksun/php-7.2.3/php_7.2.3-1_amd64.deb
You can remove it from your system anytime using:
dpkg -r php
卸载时只需要输入dpkg -r php
即可。
卸载 make install 安装的包
再次执行 checkinstall
,然后执行删除命令。