从 ubuntu dvd 安装包

从 ubuntu dvd 安装包

我想从 ubunu 14.04 LTS dvd 安装一些软件包。下面是我所做的。有人能指出缺少了什么吗?

root@ubuntu:~# mount ~/ubuntu-14.04-desktop-amd64.iso /tmpmt -o loop
root@ubuntu:~# ls /tmpmt 
autorun.inf  casper  EFI      isolinux    pics  preseed             ubuntu
boot         dists   install  md5sum.txt  pool  README.diskdefines  wubi.exe

root@ubuntu:~# add-apt-repository "deb file:/tmpmt/ trusty dists"
root@ubuntu:~# apt-get update
Ign cdrom://Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417) trusty InRelease
Ign file: trusty InRelease                                                                                    
Get:1 file: trusty Release.gpg [198 B]                                                                        
Ign cdrom://Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417) trusty/main Translation-en_US           
Ign cdrom://Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417) trusty/main Translation-en              
Ign cdrom://Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417) trusty/restricted Translation-en_US     
Ign cdrom://Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417) trusty/restricted Translation-en        
Get:2 file: trusty Release [3,334 B]                                                                          
65% [Connecting to us.archive.ubuntu.com (91.189.91.13)] [Connecting to security.ubuntu.com (91.189.91.14)] ^C

root@ubuntu:~# apt-get install apt-file
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package apt-file is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'apt-file' has no installation candidate

提前致谢,亚历克斯

答案1

以 root 身份对每张 CD 执行以下操作。

将您的 CD/DVD 挂载到 /media 并将以下行添加到您的 /etc/apt/sources.list:

deb "file:/media/Ubuntu-Server 12.04.5 LTS amd64" precise main restricted

之后更新包数据库并安装:

apt-get update
apt-get install vim

完毕!

答案2

apt-file 在 trusty 中的 universe repo 中可用。不确定 DVD 是否包含它。(我通常在 ubuntu DVD 中找到主目录而不是 universe)

您可以...检查一下。

find /mount/cdrom/something -iname "apt-file*"

答案3

挂载 ISO 文件后,您应该使用 apt-cdrom 来“计算” apt 可以识别的正确字符串:

sudo mount ~/ubuntu-14.04-desktop-amd64.iso /tmpmt -o loop
sudo apt-cdrom -m -d=/tmpmt add
sudo apt-get update

相关内容