我在 USB 驱动器上安装了全新的 Ubuntu 12.04,使用 64 位 PC (i386) 桌面映像。所谓“全新”,是指我所做的只是删除 casper-rw 文件并将其替换为一个大分区以增加持久性。
(注意:我已经知道在 14.04 或 15.04 上不会遇到这些问题;但是,我需要使用仅在 12.04 上支持的工具,因此升级不是一个选择。)
Apt-get 更新给出以下警告,但由于它们是警告而不是错误,因此我没有选中它们。它们不是我的问题的主题,除非它们是问题的一部分,但如果它们很重要,则提供它们。系统自我报告的解决方案(运行 apt-get update)显然是错误的,因为这就是产生错误的原因。
Fetched 3,253 kB in 16s (196 kB/s)
Reading package lists... Done
W: Duplicate sources.list entry cdrom://Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)/ precise/main i386 Packages (/var/lib/apt/lists/Ubuntu%2012.04.5%20LTS%20%5fPrecise%20Pangolin%5f%20-%20Release%20amd64%20(20140807.1)_dists_precise_main_binary-i386_Packages)
W: Duplicate sources.list entry cdrom://Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)/ precise/restricted i386 Packages (/var/lib/apt/lists/Ubuntu%2012.04.5%20LTS%20%5fPrecise%20Pangolin%5f%20-%20Release%20amd64%20(20140807.1)_dists_precise_restricted_binary-i386_Packages)
W: Duplicate sources.list entry cdrom://Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)/ trusty/main i386 Packages (/var/lib/apt/lists/Ubuntu%2012.04.5%20LTS%20%5fPrecise%20Pangolin%5f%20-%20Release%20amd64%20(20140807.1)_dists_trusty_main_binary-i386_Packages)
W: Duplicate sources.list entry cdrom://Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)/ trusty/restricted i386 Packages (/var/lib/apt/lists/Ubuntu%2012.04.5%20LTS%20%5fPrecise%20Pangolin%5f%20-%20Release%20amd64%20(20140807.1)_dists_trusty_restricted_binary-i386_Packages)
W: Duplicate sources.list entry cdrom://Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)/ vivid/main i386 Packages (/var/lib/apt/lists/Ubuntu%2012.04.5%20LTS%20%5fPrecise%20Pangolin%5f%20-%20Release%20amd64%20(20140807.1)_dists_vivid_main_binary-i386_Packages)
W: Duplicate sources.list entry cdrom://Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)/ vivid/restricted i386 Packages (/var/lib/apt/lists/Ubuntu%2012.04.5%20LTS%20%5fPrecise%20Pangolin%5f%20-%20Release%20amd64%20(20140807.1)_dists_vivid_restricted_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
更令人不安的,也是真正的问题是apt-get dist-upgrade退出时出现实际错误。第二调用(即仅有问题的部分)是:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up linux-image-3.13.0-55-generic (3.13.0-55.94~precise1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-3.13.0-55-generic ) points to /boot/initrd.img-3.13.0-55-generic (/boot/initrd.img-3.13.0-55-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-55-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-3.13.0-55-generic ) points to /boot/vmlinuz-3.13.0-55-generic (/boot/vmlinuz-3.13.0-55-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-55-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-55-generic
cryptsetup: WARNING: failed to detect canonical device of overlayfs
cryptsetup: WARNING: could not determine root device from /etc/fstab
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-55-generic.postinst line 1025.
dpkg: error processing linux-image-3.13.0-55-generic (--configure): subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic-lts-trusty: linux-image-generic-lts-trusty depends on linux-image-3.13.0-55-generic; however: Package linux-image-3.13.0-55-generic is not configured yet.
dpkg: error processing linux-image-generic-lts-trusty (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-trusty: linux-generic-lts-trusty depends on linux-image-generic-lts-trusty; however: Package linux-image-generic-lts-trusty is not configured yet.
dpkg: error processing linux-generic-lts-trusty (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image-3.13.0-55-generic: linux-signed-image-3.13.0-55-generic depends on linux-image-3.13.0-55-generic (= 3.13.0-55.94~precise1); however: Package linux-image-3.13.0-55-generic is not configured yet.
dpkg: error processing linux-signed-image-3.13.0-55-generic (--configure):
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image-generic-lts-trusty: linux-signed-image-generic-lts-trusty depends on linux-signed-image-3.13.0-55-generic; however: Package linux-signed-image-3.13.0-55-generic is not configured yet.
dpkg: error processing linux-signed-image-generic-lts-trusty (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-generic-lts-trusty: linux-signed-generic-lts-trusty depends on linux-signed-image-generic-lts-trusty; however: Package linux-signed-image-generic-lts-trusty is not configured yet.
dpkg: error processing linux-signed-generic-lts-trusty (--configure): dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-3.13.0-55-generic
linux-image-generic-lts-trusty
linux-generic-lts-trusty
linux-signed-image-3.13.0-55-generic
linux-signed-image-generic-lts-trusty
linux-signed-generic-lts-trusty
E: Sub-process /usr/bin/dpkg returned an error code (1)
当新系统上的升级出现如此严重的问题时,我不知道该怎么办;我甚至不确定大多数问题是什么。
(编辑:我上面提到的工具是 Nvidia Nsight Eclipse,其具体目的是以我的笔记本电脑作为主机、以 Nvidia Jetson 开发板作为目标来交叉编译代码。我的理解是它只支持 Ubuntu 12.04。)
答案1
从Nvidia 官方网站:NVIDIA Nsight Eclipse Edition 的最新版本支持 CUDA C/C++,并支持 MAC 和 Linux 平台。只需安装 CUDA Toolkit 并在命令行上运行“nsight”即可。
检查一下:
apt-cache policy nvidia-cuda-toolkit
所包含的软件包如下这里其中一个如你所见nvidia-nsight:NVIDIA Nsight Eclipse 版本并且它为所有当前支持的 Ubuntu 发行版进行维护。
nvidia-cuda-toolkit
要在终端运行中安装:
sudo apt-get install nvidia-cuda-toolkit
适用于 Ubuntu14.04 x86 64 位的 CUDA 6.5 工具包(具有 TK1 交叉开发支持)可从此处下载http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda-repo-ubuntu1404-6-5-prod_6.5-19_amd64.deb