PDA

View Full Version : [ubuntu] packages copy



lio_013
July 5th, 2008, 09:12 PM
how can i copy the packages from a cd to the path
/var/cache/apt/archives?
i tryed many times but i couldnot
:(:(:(

sisco311
July 5th, 2008, 09:19 PM
open your file browser as root:

gksu nautilusor use the cp command from a terminal:

sudo cp /media/cdrom/path/to/files/filename.deb /var/cache/apt/archivesto copy all files from a folder:

sudo cp /media/cdrom/path/to/folder/* /var/cache/apt/archives

lio_013
July 5th, 2008, 09:25 PM
thanks i wasnot know how to browse folders as root
im copying them now

durand
July 6th, 2008, 12:10 PM
open your file browser as root:

gksu nautilusor use the cp command from a terminal:

sudo cp /media/cdrom/path/to/files/filename.deb /var/cache/apt/archivesto copy all files from a folder:

sudo cp /media/cdrom/path/to/folder/* /var/cache/apt/archives

I think you need to use -R for cp rather than an asterisk because there may be folders in there as well which won't be copied.

ChameleonDave
July 6th, 2008, 01:37 PM
I think you need to use -R for cp rather than an asterisk because there may be folders in there as well which won't be copied.

Probably best to do "*.deb" in this case.

durand
July 6th, 2008, 01:41 PM
Oh yeah, I meant in general usage of cp.

sayakb
July 6th, 2008, 01:45 PM
Copying the packages to /var/cache/apt/archives will not install them. Copy them to some other location and open that location at a terminal and do:

sudo dpkg -i *.deb
Caution: If the CD contains two different versions of the same package, dpkg may cause a broken dependency situation.

ChameleonDave
July 6th, 2008, 02:10 PM
Copying the packages to /var/cache/apt/archives will not install them. Copy them to some other location and open that location at a terminal and do:

sudo dpkg -i *.deb
Caution: If the CD contains two different versions of the same package, dpkg may cause a broken dependency situation.

I don't think anyone implied that that would install them!

It is not advisable to install large numbers of packages with the command you give. What if there are problems, such as you mentioned?

Far better to dump those packages in /var/cache/apt/archives and then install them using Synaptic. You then get the latest version of everything, with dependencies handled.

durand
July 6th, 2008, 06:51 PM
I don't think anyone implied that that would install them!

It is not advisable to install large numbers of packages with the command you give. What if there are problems, such as you mentioned?

Far better to dump those packages in /var/cache/apt/archives and then install them using Synaptic. You then get the latest version of everything, with dependencies handled.

Yes, my thoughts exactly.

ChameleonDave
July 8th, 2008, 01:09 PM
By the way, "gksudo nautilus" is only the appropriate command to open the graphical file manager as root on GNOME (standard Ubuntu). For KDE (Kubuntu), use "kdesudo konqueror"; for Xfce (Xubuntu), use "gksudo thunar".

Make sure you close the file manager after you have finished the administrative task in question, as it is dangerous to use it for general purposes. Any files you create whilst using a file manager as root will be owned by root, and will not be editable by you as a normal user.


thanks i wasnot know how to browse folders as root
im copying them now

Great. It seems your problem is fixed. Perhaps you could use the "Thread Tools" menu to mark this thread as solved.