zoukankan      html  css  js  c++  java
  • LLVM 安装教程(包安装)

    LLVM 安装教程

    环境:ubuntu16.04  llvm-4.0 clang-4.0

    步骤:

    1.依赖库安装

    $ sudo apt-get install build-essential curl libcap-dev git cmake libncurses5-dev python-minimal python-pip unzip

    2.安装LLVM 需要注意:

    对于不同版本的ubuntu应该到 LLVM Package Repository 找到对应版本的。写入source.list 中。

    16.04 为例:

    deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main

    deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main

    添加repository key并下载llvm 3.9packages

    $ wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -  

    $ sudo apt-get update  

    $ sudo apt-get install clang-4.0  libclang-common-4.0-dev libclang-4.0-dev libclang1-4.0 libclang1-4.0-dbg libllvm-4.0-ocaml-dev libllvm4.0 libllvm4.0-dbg lldb-4.0 llvm-4.0 llvm-4.0-dev  llvm-4.0-runtime clang-format-4.0 python-clang-4.0 libfuzzer-4.0-dev

    注意这个时候/usr/bin/clang-4.0是在PATH里面,为了使用clang以及其他不带4.0后缀的版本 ,需要在~/.bashrc里面改一下PATH(注意不要在命令行中配置,否则每次开机都得配置一遍)

    export PATH="/usr/lib/llvm-4.0/bin:$PATH"

    至此,已经可以使用clang进行测试。

    这里有个问题,如果出现以下错误,是libwinpr-synch0.1在上次安装过程中失败的原因,需要重新安装。

    dpkg: error processing package libwinpr-synch0.1:amd64 (--configure):

     package libwinpr-synch0.1:amd64 is not ready for configuration

    重新安装使用以下命令:

    sudo apt-get --reinstall install libwinpr-synch0.1

    如果sources.list一直不能更新的话,替换原来的源,将其改为aliyun(亲测可行)。

    使用点sources.list文件如下:

    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

     

    #deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main

    #deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main

    # 4.0

    deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main

    deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main

  • 相关阅读:
    Win10 Tensorflow 配置Mask_RCNN
    Tensorflow学习(练习)—使用inception做图像识别
    Tensorflow学习(练习)—下载骨骼图像识别网络inception数据集
    Tensorflow递归神经网络学习练习
    Tensorflow学习练习-卷积神经网络应用于手写数字数据集训练
    Tensorflow 优化学习
    Tensorflow学习—— AdamOptimizer
    Tensorflow练习
    Tensorflow手写数字识别(交叉熵)练习
    Tensorflow手写数字识别训练(梯度下降法)
  • 原文地址:https://www.cnblogs.com/jourluohua/p/9512332.html
Copyright © 2011-2022 走看看