I have all images of Debian, Ubuntu and Ubuntustudio as .iso
. How can I use them as repository to install my desired packages with sudo apt-get install package-name
?
I easily mount the .iso
file with Archive Mounter, but when adding CD-ROM in Software Sources it says Please Insert CD-ROM.
How should I do this without burning them to disk?
This question has already been answered as part of an answer to a different question: How to make USB drive as local repository
Try this
then add
deb file:///media/mountpoint distro main contrib
to/etc/sources.list
with text editor and not with some GUI tool, then update from package manager.The above steps didn't worked for me. Anyways I happened to work it out with the help of debian user list and it worked.
Here are the steps.
Assume you have the iso file in /home/iso-files/ folder. I had the debian-7.1.0-amd64-DVD-1.iso in /home/iso-files folder
Make a new folder in /media
you will have to run the above command as root
Run the following command as root
Add an entry to /etc/fstab as follows
Make an entry in your /etc/apt/sources.list as follows
Comment out everything else in /etc/apt/sources.list by adding a # at the start of every entry. only the above line should be uncommented.
Run the following command as root
Install any package name and now it should work.
You can check if your entry in fstab is correct or not by unmounting the dvd and then directly mounting the mountpoint
If you plan to automount the dvd at start up you should remove
user,noauto
from entry in /etc/fstabThe above steps are working just perfectly for me. It should work for you also! I know I am pretty late to answer you, but anyways!
This works.
I found the answer here: http://ubuntuguide.net/4-ways-to-upgrade-to-ubuntu-11-04-natty-narwhalonlineoffline (number 4).
Essentially, what it suggests is mounting the ISO as a CDROM. This probably fools the system into believing the ISO image is a real CD.
sudo mount -t iso9660 -o loop PATH/TO/ISO /cdrom
(I'm using this method to upgrade from 11.10 to 12.04 Alpha2, because it won't fit on a CD and for some reason my system isn't happy with USB drives.)
I method described by dv3500ea does not working now. (I think it worked in past). It displays a message like:
I fount this workaround useful:
After doing dv3500ea's method's first two steps, (I write this again for user's convenience)
you should run this:
If it gives you error, saying
/media/apt
does not exists, create one with thisThen run the third command of dv5300ea's command(slightly changed):
This should perfectly work.
my :
Slight change to this, helped me get it working especially in a amd64/i386 mixed environment.
** Instead of using the mount command I just permanently mounted the iso in /etc/fstab **
Salam
Personal Repositories in Ubuntu: https://help.ubuntu.com/community/Repositories/Personal
to add mount point to sourcelist add
in general:
< Alexare asked: I have all images of Debian, Ubuntu and Ubuntustudio as .iso. How can I use them as repository to install my desired packages with sudo apt-get install package-name? >
my answer:
I open the iso file with file-roller, extract from there the directories '.../dists/' and '.../pool/' to an empty directory (on a hard disk or extraible media, e.g. usb stick) and add to /etc/apt/sources.list:
deb file:/path_to/that_directory distro main [contrib]
Then I open aptitude as root and update the source
Done.
You can add on the media and in sources.list more then one of these files.
Probe it if you like with 'apt-get' instead using aptitude, I don't know if that works.