一些设置

本文档提供了修复Ubuntu从17.10升级至18.04过程中遇到的问题,涉及Python版本调整、CUDNN安装步骤、TensorFlow编译对应Bazel版本指导、CUDA卸载流程、TensorFlow C++ API依赖管理及解决使用QT时CuBLAS未找到的错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

0

原因 python 默认设置被改为3,需要改为2.7
https://askubuntu.com/questions/1104192/unable-to-upgrade-to-ubuntu-18-04-from-ubuntu-17-10

Following Velkan suggestion, I performed strace -f do-release-upgrade finding an issue related to language-pack so I fixed it:

sudo apt-get install --reinstall language-pack-en-base
sudo dpkg-reconfigure locales

Then, reading /var/log/dist-upgrade/main.log, I discovered that there was an issue with Python 2 despite the error log was pointing to Python 3, so I tried:

sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python

Then:

sudo apt-get update && sudo apt-get dist-upgrade

Now, it seems that sudo do-release-upgrade is working fine!

1

CUDNN的Linux(Ubuntu)安装方法
https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html

2.3.1. Installing from a Tar File

Navigate to your directory containing the cuDNN Tar file.
Unzip the cuDNN package.

$ tar -xzvf cudnn-9.0-linux-x64-v7.tgz

Copy the following files into the CUDA Toolkit directory, and change the file permissions.

$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include
$ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

2

tensorflow 自己build对应的bazel版本
https://www.tensorflow.org/install/source#cpu
https://github.com/bazelbuild/bazel/releases?after=0.20.0
// 以下是统一写法
chmod +x bazel--installer-linux-x86_64.sh
./bazel--installer-linux-x86_64.sh --user

//   以下是对应版本的写法
chmod +x bazel-0.16.1-installer-linux-x86_64.sh
./bazel-0.16.1-installer-linux-x86_64.sh --user

3

Large Scale Visual Recognition Challenge 2017 (ILSVRC2017)
Object detection from video
http://bvisionweb1.cs.unc.edu/ILSVRC2017/download-videos-1p39.php

4

remove CUDA in Ubuntu:
注意systemctl isolate multi-user.target会关了UI,变成terminal模式。最好提前下载好新的cuda,关后cd到下载目录,sudo sh blabla

cd /usr/local/cuda-9.0/bin
sudo ./uninstall_cuda_9.0.pl
sudo ./cuda-uninstaller  # CUDA 10.1
sudo apt-get purge nvidia*

# Note this might remove your cuda installation as well
sudo apt-get autoremove 

# install driver, first shut down UI
systemctl isolate multi-user.target

5

tensorflow c++ api protobuf and egien version and download link:
protobuf的版本可以在tensorflow/worksapce.bzl里找到下载链接
protobuf 安装:

./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.

6

cublas not found when using QT.
主要原因:没有更新link,运行sudo ldconfig /usr/local/cuda-10.0/lib64

    This may happen when you run sudo ldconfig after copying cuDNN files.

    After installing cuDNN, copying the extracted files to /usr/lib/cuda/lib64 and creating the symlinks, things may go wrong with the symlinks.

    So go to /usr/local/cuda/lib64/ and run ls -lha libcudnn*.

    You should see two symlinks (bold teal) and one single file. Something like this:

    /usr/local/cuda/lib64$ ls -lha libcudnn*
    lrwxrwxrwx 1 root root  13 Dez 25 23:56 libcudnn.so -> libcudnn.so.5
    lrwxrwxrwx 1 root root  17 Dez 25 23:55 libcudnn.so.5 -> libcudnn.so.5.1.5
    -rwxr-xr-x 1 root root 76M Dez 25 23:27 libcudnn.so.5.1.5

    The exact version of libcudnn.so.5.1.5 maybe be a little different for you (maybe libcudnn.so.5.1.10). In that case, adapt the code accordingly

    If libcudnn.so and libcudnn.so.5 are not symlinks then this is the reason why you got this error. If so, this is what you need to do:

    /usr/local/cuda/lib64$ sudo rm libcudnn.so
    /usr/local/cuda/lib64$ sudo rm libcudnn.so.5
    /usr/local/cuda/lib64$ sudo ln libcudnn.so.5.1.5 libcudnn.so.5
    /usr/local/cuda/lib64$ sudo ln libcudnn.so.5 libcudnn.so
    sudo ldconfig
sudo ln -s target source
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值