我该如何解决这个“部分升级”问题(与 CUDA 和 Tensorflow 相关)?

我该如何解决这个“部分升级”问题(与 CUDA 和 Tensorflow 相关)?

我的 Lubuntu 系统最近开始抱怨它无法更新软件并提供部分升级 - 我知道这是个坏消息。

我怀疑它与我的 Tensorflow 安装有关(我的大多数问题都与此有关,而且我害怕以任何方式改变它!)。

nvcc --version报告版本 10.1,V10.1.243

nvidia-smi报告驱动程序版本:440.64.00 CUDA 版本:10.2

cuDNN 是 7.6 版本

Tensorflow 是 1.14.0 版本

看来更新想要删除 cuda 和 nvidia 驱动程序包(我已附加 dist-upgrade 的输出)。请问有人能解释一下问题的根源是什么,以及我可以做些什么来继续(希望不会完全破坏我工作的 tensorflow 安装)。

sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  cuda-command-line-tools-10-1 cuda-compiler-10-1 cuda-cufft-10-1 cuda-cufft-dev-10-1
  cuda-cuobjdump-10-1 cuda-cupti-10-1 cuda-curand-10-1 cuda-curand-dev-10-1
  cuda-cusolver-10-1 cuda-cusolver-dev-10-1 cuda-cusparse-10-1 cuda-cusparse-dev-10-1
  cuda-documentation-10-1 cuda-gdb-10-1 cuda-gpu-library-advisor-10-1
  cuda-libraries-10-1 cuda-libraries-dev-10-1 cuda-memcheck-10-1 cuda-misc-headers-10-1
  cuda-npp-10-1 cuda-npp-dev-10-1 cuda-nsight-10-1 cuda-nsight-compute-10-1
  cuda-nsight-systems-10-1 cuda-nvcc-10-1 cuda-nvdisasm-10-1 cuda-nvgraph-10-1
  cuda-nvgraph-dev-10-1 cuda-nvjpeg-10-1 cuda-nvjpeg-dev-10-1 cuda-nvml-dev-10-1
  cuda-nvprof-10-1 cuda-nvprune-10-1 cuda-nvrtc-10-1 cuda-nvrtc-dev-10-1 cuda-nvtx-10-1
  cuda-nvvp-10-1 cuda-samples-10-1 cuda-sanitizer-api-10-1 cuda-toolkit-10-1
  cuda-tools-10-1 cuda-visual-tools-10-1 libnvidia-cfg1-440 libnvidia-common-440
  libnvidia-fbc1-440 libxnvctrl0 linux-headers-4.15.0-96 linux-headers-4.15.0-96-generic
  linux-image-4.15.0-96-generic linux-modules-4.15.0-96-generic
  linux-modules-extra-4.15.0-96-generic nsight-compute-2019.5.0 nsight-systems-2019.5.2
  nvidia-compute-utils-440 nvidia-kernel-source-440 nvidia-modprobe nvidia-prime
  nvidia-settings python-apt python-bs4 python-html5lib python-lxml python-webencodings
  screen-resolution-extra xserver-xorg-video-nvidia-440
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
  cuda-10-1 cuda-demo-suite-10-1 cuda-drivers cuda-runtime-10-1 libnvidia-decode-440
  libnvidia-encode-440 libnvidia-gl-440 libnvidia-ifr1-440 nvidia-dkms-440
  nvidia-driver-440 nvidia-kernel-common-440 nvidia-utils-440
The following NEW packages will be installed
  linux-headers-4.15.0-106 linux-headers-4.15.0-106-generic
  linux-image-4.15.0-106-generic linux-modules-4.15.0-106-generic
  linux-modules-extra-4.15.0-106-generic
The following packages will be upgraded:
  aptdaemon aptdaemon-data ca-certificates chromium-codecs-ffmpeg-extra firefox
  firefox-locale-en flashplugin-installer google-chrome-stable intel-microcode
  libjpeg-turbo8 libjpeg-turbo8-dev libjson-c-dev libjson-c3 libnautilus-extension1a
  libnetplan0 libnss-systemd libpam-systemd libpulse-mainloop-glib0 libpulse0
  libpulsedsp libsqlite3-0 libsqlite3-dev libssl-dev libssl-doc libssl1.1 libsystemd0
  libudev1 libxnvctrl0 linux-generic linux-headers-generic linux-image-generic
  linux-libc-dev linux-signed-generic netplan.io nodejs nplan nvidia-modprobe
  nvidia-settings openssl pulseaudio pulseaudio-module-bluetooth pulseaudio-utils
  python-apt python-apt-common python-rosdistro python-rosdistro-modules python3-apport
  python3-apt python3-aptdaemon python3-aptdaemon.gtk3widgets python3-problem-report
  python3-software-properties ros-melodic-actionlib ros-melodic-actionlib-msgs
  ros-melodic-actionlib-tutorials ros-melodic-angles ros-melodic-bond
  ros-melodic-bond-core ros-melodic-bondcpp ros-melodic-bondpy
  ros-melodic-camera-calibration ros-melodic-camera-calibration-parsers
  ros-melodic-camera-info-manager ros-melodic-catkin ros-melodic-class-loader
  ros-melodic-cmake-modules ros-melodic-common-msgs ros-melodic-common-tutorials
  ros-melodic-compressed-depth-image-transport ros-melodic-compressed-image-transport
  ros-melodic-control-msgs ros-melodic-control-toolbox ros-melodic-controller-interface
  ros-melodic-controller-manager ros-melodic-controller-manager-msgs
  ros-melodic-cpp-common ros-melodic-cv-bridge ros-melodic-depth-image-proc
  ros-melodic-desktop ros-melodic-desktop-full ros-melodic-diagnostic-aggregator
  ros-melodic-diagnostic-analysis ros-melodic-diagnostic-common-diagnostics
  ros-melodic-diagnostic-msgs ros-melodic-diagnostic-updater ros-melodic-diagnostics
  ros-melodic-diff-drive-controller ros-melodic-dynamic-reconfigure
  ros-melodic-eigen-conversions ros-melodic-executive-smach ros-melodic-filters
  ros-melodic-forward-command-controller ros-melodic-gazebo-dev ros-melodic-gazebo-msgs
  ros-melodic-gazebo-plugins ros-melodic-gazebo-ros ros-melodic-gazebo-ros-control
  ros-melodic-gazebo-ros-pkgs ros-melodic-gencpp ros-melodic-geneus ros-melodic-genlisp
  ros-melodic-genmsg ros-melodic-gennodejs ros-melodic-genpy ros-melodic-geometry
  ros-melodic-geometry-msgs ros-melodic-geometry-tutorials ros-melodic-gl-dependency
  ros-melodic-hardware-interface ros-melodic-image-common ros-melodic-image-geometry
  ros-melodic-image-pipeline ros-melodic-image-proc ros-melodic-image-publisher
  ros-melodic-image-rotate ros-melodic-image-transport
  ros-melodic-image-transport-plugins ros-melodic-image-view
  ros-melodic-interactive-marker-tutorials ros-melodic-interactive-markers
  ros-melodic-joint-limits-interface ros-melodic-joint-state-controller
  ros-melodic-joint-state-publisher ros-melodic-kdl-conversions ros-melodic-kdl-parser
  ros-melodic-kdl-parser-py ros-melodic-laser-assembler ros-melodic-laser-filters
  ros-melodic-laser-geometry ros-melodic-laser-pipeline ros-melodic-librviz-tutorial
  ros-melodic-libuvc ros-melodic-libuvc-camera ros-melodic-map-msgs
  ros-melodic-media-export ros-melodic-message-filters ros-melodic-message-generation
  ros-melodic-message-runtime ros-melodic-mk ros-melodic-nav-msgs ros-melodic-nodelet
  ros-melodic-nodelet-core ros-melodic-nodelet-topic-tools
  ros-melodic-nodelet-tutorial-math ros-melodic-orocos-kdl ros-melodic-pcl-conversions
  ros-melodic-pcl-msgs ros-melodic-pcl-ros ros-melodic-perception
  ros-melodic-perception-pcl ros-melodic-pluginlib ros-melodic-pluginlib-tutorials
  ros-melodic-polled-camera ros-melodic-position-controllers
  ros-melodic-python-orocos-kdl ros-melodic-python-qt-binding ros-melodic-qt-dotgraph
  ros-melodic-qt-gui ros-melodic-qt-gui-cpp ros-melodic-qt-gui-py-common
  ros-melodic-qwt-dependency ros-melodic-realtime-tools ros-melodic-resource-retriever
  ros-melodic-robot ros-melodic-robot-state-publisher ros-melodic-ros
  ros-melodic-ros-base ros-melodic-ros-comm ros-melodic-ros-core
  ros-melodic-ros-environment ros-melodic-ros-tutorials ros-melodic-rosbag
  ros-melodic-rosbag-migration-rule ros-melodic-rosbag-storage ros-melodic-rosbash
  ros-melodic-rosboost-cfg ros-melodic-rosbuild ros-melodic-rosclean
  ros-melodic-rosconsole ros-melodic-rosconsole-bridge ros-melodic-roscpp
  ros-melodic-roscpp-core ros-melodic-roscpp-serialization ros-melodic-roscpp-traits
  ros-melodic-roscpp-tutorials ros-melodic-roscreate ros-melodic-rosgraph
  ros-melodic-rosgraph-msgs ros-melodic-roslang ros-melodic-roslaunch ros-melodic-roslib
  ros-melodic-roslint ros-melodic-roslisp ros-melodic-roslz4 ros-melodic-rosmake
  ros-melodic-rosmaster ros-melodic-rosmsg ros-melodic-rosnode ros-melodic-rosout
  ros-melodic-rospack ros-melodic-rosparam ros-melodic-rospy ros-melodic-rospy-tutorials
  ros-melodic-rosservice ros-melodic-rostest ros-melodic-rostime ros-melodic-rostopic
  ros-melodic-rosunit ros-melodic-roswtf ros-melodic-rqt-action ros-melodic-rqt-bag
  ros-melodic-rqt-bag-plugins ros-melodic-rqt-common-plugins ros-melodic-rqt-console
  ros-melodic-rqt-dep ros-melodic-rqt-graph ros-melodic-rqt-gui ros-melodic-rqt-gui-cpp
  ros-melodic-rqt-gui-py ros-melodic-rqt-image-view ros-melodic-rqt-launch
  ros-melodic-rqt-logger-level ros-melodic-rqt-moveit ros-melodic-rqt-msg
  ros-melodic-rqt-nav-view ros-melodic-rqt-plot ros-melodic-rqt-pose-view
  ros-melodic-rqt-publisher ros-melodic-rqt-py-common ros-melodic-rqt-py-console
  ros-melodic-rqt-reconfigure ros-melodic-rqt-robot-dashboard
  ros-melodic-rqt-robot-monitor ros-melodic-rqt-robot-plugins
  ros-melodic-rqt-robot-steering ros-melodic-rqt-runtime-monitor ros-melodic-rqt-rviz
  ros-melodic-rqt-service-caller ros-melodic-rqt-shell ros-melodic-rqt-srv
  ros-melodic-rqt-tf-tree ros-melodic-rqt-top ros-melodic-rqt-topic ros-melodic-rqt-web
  ros-melodic-rviz ros-melodic-rviz-plugin-tutorials ros-melodic-rviz-python-tutorial
  ros-melodic-self-test ros-melodic-sensor-msgs ros-melodic-shape-msgs
  ros-melodic-simulators ros-melodic-smach ros-melodic-smach-msgs ros-melodic-smach-ros
  ros-melodic-smclib ros-melodic-stage ros-melodic-stage-ros ros-melodic-std-msgs
  ros-melodic-std-srvs ros-melodic-stereo-image-proc ros-melodic-stereo-msgs
  ros-melodic-tf ros-melodic-tf-conversions ros-melodic-tf2 ros-melodic-tf2-eigen
  ros-melodic-tf2-geometry-msgs ros-melodic-tf2-kdl ros-melodic-tf2-msgs
  ros-melodic-tf2-py ros-melodic-tf2-ros ros-melodic-theora-image-transport
  ros-melodic-topic-tools ros-melodic-trajectory-msgs ros-melodic-transmission-interface
  ros-melodic-turtle-actionlib ros-melodic-turtle-tf ros-melodic-turtle-tf2
  ros-melodic-turtlesim ros-melodic-urdf ros-melodic-urdf-parser-plugin
  ros-melodic-urdf-sim-tutorial ros-melodic-urdf-tutorial ros-melodic-urdfdom-py
  ros-melodic-usb-cam ros-melodic-vision-opencv
  ros-melodic-visualization-marker-tutorials ros-melodic-visualization-msgs
  ros-melodic-visualization-tutorials ros-melodic-viz ros-melodic-webkit-dependency
  ros-melodic-xacro ros-melodic-xmlrpcpp software-properties-common
  software-properties-gtk steam-launcher systemd systemd-coredump systemd-sysv
  teamviewer udev xserver-common xserver-xorg-core
302 to upgrade, 5 to newly install, 12 to remove and 0 not to upgrade.

答案1

小心,Nvidia 提供的 CUDA 软件包依赖于过时的 Nvidia 驱动程序,可能是 418。当您重新安装 440 驱动程序时,418 被删除,所有依赖项都被标记为删除 - 这就是所有的 cuda 文件。我会立即备份 /usr/local/cuda-10.1 目录,这是一个自动删除的目录。对于 Nvidia 提供的版本的原始 CUDA 安装(不是标准存储库中提供的旧版本),我建议完全避免使用包管理器,只需解压 deb 文件(和内容 deb 文件),而不是安装任何东西。对于您的情况(就像我经历的那样),我备份了 /usr/local/cuda-10.1 目录,运行了自动删除(删除了 ...cuda-10.1),并恢复了备份文件。看看

dpkg -l |grep cuda

并单独清除未处于“ii”状态的 cuda 软件包(除 3 个之外的所有软件包)。我剩下 nvidia-cuda-dev、libcdart10.1 和 cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00。不再有软件包管理器投诉,内核更新将自动获得新的 Nvidia 驱动程序构建,这是理所当然的。

相关内容