[英]How to uninstall libc++ after installing from source?
I installed libc++ from source using following script. 我使用以下脚本从源代码安装了libc ++。 The make uninstall
is not supported. 不支持make uninstall
。 What would be the best way to uninstall it? 卸载它的最佳方法是什么?
git clone --depth=1 https://github.com/llvm-mirror/llvm.git llvm-source
git clone --depth=1 https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx
git clone --depth=1 https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi
export C_COMPILER=clang
export COMPILER=clang++
# Build and install libc++
mkdir llvm-build && cd llvm-build
cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr \
../llvm-source
make cxx
sudo make install-cxxabi install-cxx
Well, after lot of searching, it is clear that there is no automatic or even semi-automatic way to uninstall when make unintsall
is not implemented. 好了,经过大量搜索,很明显,当未实现make unintsall
时,没有自动甚至半自动的卸载方法。 There are two ways to get around this: 解决此问题的方法有两种:
If using cmake then run the install again but set the flag like -DCMAKE_INSTALL_PREFIX=./output
. 如果使用cmake,则再次运行安装程序,但设置标志-DCMAKE_INSTALL_PREFIX=./output
。 This will cause cmake to put all files in ./output. 这将导致cmake将所有文件放入./output。 Now you can observe the files, and manually delete them. 现在,您可以观察文件,并手动删除它们。 I think by default cmake would put these files at /usr/local
. 我认为默认情况下cmake会将这些文件放在/usr/local
。
Another cool trick you can use if install_manifest.txt file is generated: cat install_manifest.txt | xargs echo sudo rm | sh
如果生成了install_manifest.txt文件,则可以使用另一个很酷的技巧 : cat install_manifest.txt | xargs echo sudo rm | sh
cat install_manifest.txt | xargs echo sudo rm | sh
cat install_manifest.txt | xargs echo sudo rm | sh
. cat install_manifest.txt | xargs echo sudo rm | sh
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.