1

I want to install some package from ubunu 14.04 LTS dvd. Below is what I did. Could anyone please point out what was missing?

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

Thanks in advance, Alex

AlexL
  • 121

3 Answers3

1

Do the following as root for each CD.

Mount your CD/DVD on /media and add the following line to your /etc/apt/sources.list:

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

After that update packages db and install:

apt-get update
apt-get install vim

Done!

olafrv
  • 11
  • For 18.04 the top line of /etc/apt/sources.list can be uncommented, followed by # apt update. I also had to run # dpkg --configure -a – duanev Aug 23 '18 at 23:25
0

After mounting ISO file, you should use apt-cdrom to "calculate" the correct string that will be recognized by apt:

sudo mount ~/ubuntu-14.04-desktop-amd64.iso /tmpmt -o loop
sudo apt-cdrom -m -d=/tmpmt add
sudo apt-get update
josircg
  • 1,239
0

The apt-file is available in the universe repo in trusty. Not sure if the dvd includes it. (I usually find the main dicrectoy and not the universe in the ubuntu dvd)

You may ... to check.

find /mount/cdrom/something -iname "apt-file*"
  • I browsed through the iso file, majority of data is contained in a single file: casper/filesystem.squashfs. there is no *.deb files under dists/trusty/main/binary-amd64/ the size of the entire directory is just 10K. how can we extract packages from the Ubuntu iso? – AlexL Aug 14 '14 at 13:41