【问题标题】:How to uninstall libc++ after installing from source?从源代码安装后如何卸载 libc++?
【发布时间】:2017-12-22 08:37:21
【问题描述】:

我使用以下脚本从源代码安装了 libc++。不支持make uninstall。卸载它的最佳方法是什么?

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

【问题讨论】:

标签: linux llvm uninstallation llvm-clang libc++


【解决方案1】:

好吧,经过大量搜索,很明显,当make unintsall没有实现时,没有自动甚至半自动的卸载方式。有两种方法可以解决这个问题:

  1. 如果使用 cmake,则再次运行安装,但将标志设置为 -DCMAKE_INSTALL_PREFIX=./output。这将导致 cmake 将所有文件放在 ./output 中。现在您可以观察文件,并手动删除它们。我认为默认情况下 cmake 会将这些文件放在/usr/local

  2. 如果生成 install_manifest.txt 文件,您可以使用另一个 cool trickcat install_manifest.txt | xargs echo sudo rm | sh

【讨论】:

    猜你喜欢
    • 2013-09-03
    • 2014-10-07
    • 2016-02-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-14
    • 2010-12-01
    相关资源
    最近更新 更多