cmake 卸载

15 篇文章 0 订阅

卸载

make uninstall

首先需要检查卸载是否存在,使用make help


..[$] <( (git)-[release-0.6.3]-)> make help
The following are some of the valid targets for this Makefile:
... all (the default if no target is provided)
... clean
... depend
... install/strip
... install/local
... install
... list_install_components
... rebuild_cache
... edit_cache
... osqp_demo
... osqp
... osqpstatic
... linsys_pardiso
... linsys_qdldl
... uninstall
... qdldl_example
... qdldlstatic
... qdldl
... qdldlobject

可以看到uninstall 存在,那么直接运行 make uninstall即可,注意是在build文件夹下

根据installl_manifest.txt卸载

查看该文件是否存在,可以对照文件所列出的目录直接删除;也可以直接利用xargs删除

cat install_manifest.txt | sudo xargs rm

也可以使用下面的脚本进行删除


MANIFEST="install_manifest.txt"

if [ ! -f "$MANIFEST" ]; then
  echo "install_manifest.txt not found!"
  exit 1
fi
#IFS= 将内部字段分隔符设置为空值
#每一行读入变量 file
while IFS= read -r file; do 
  if [ -f "$file" ]; then
    echo "Removing $file"
    sudo rm "$file"
  elif [ -d "$file" ]; then
    echo "Removing directory $file"
    sudo rmdir "$file"
  else
    echo "File $file does not exist, skipping"
  fi
done < "$MANIFEST" # 指定循环的输入是 MANIFEST 文件。

chmod +x uninstall.sh
./uninstall.sh

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值