PDA

View Full Version : [ubuntu] install packages



lio_013
July 5th, 2008, 01:19 AM
i reinstall ubuntu on my computer
and i have more than 200 package on a cd "i burn them as data cd "
is there a method to install them all together ?
not one by one
please help

scragar
July 5th, 2008, 01:26 AM
if they are .deb then yes:

cd /media/cdrom0
for i in `ls`
do
sudo dpkg -if /media/cdrom0/
done
if that doesn't work there's a recursive option that may work:

sudo dpkg -R -i /media/cdrom0


after that's done run
sudo apt-get install -f
to make sure everything has the dependencies met.

lio_013
July 5th, 2008, 02:58 AM
i tryed to do the first code but i couldnot
i did the second one it cause me alot of problems on the synpatic and add/remove
now im running on "sudo apt-get update to fix the problems"
any ideas????

lio_013
July 5th, 2008, 03:10 AM
i alsohad a packages that i cannot remove from my synaptic list
the package is kio-umountwrapper

ChameleonDave
July 5th, 2008, 03:27 AM
i alsohad a packages that i cannot remove from my synaptic list
the package is kio-umountwrapper

That's one that comes up more than once.

Some people say it is because the package tries to remove a file that doesn't exist, and that creating the file will solve the problem by allowing it to be removed. One of the following pairs of commands should fix that (depending on the exact version of kde):


mkdir -p /usr/share/apps/d3lphin/servicemenus/
touch /usr/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib
or

mkdir -p /usr/share/apps/dolphin/servicemenus/
touch /usr/share/apps/dolphin/servicemenus/media_safelyremove.desktop.distrib

When I had the problem, I fixed it in the following heavy-handed way:



sudo cd /var/lib/dpkg/
sudo mkdir info.backup
sudo mv info/kio-umountwrapper* info.backup/


or



sudo rm /var/lib/dpkg/info/kio-umount*


Once you have done any of those four solutions, do the following:



sudo dpkg --force-all --purge kio-umountwrapper
sudo apt-get install -f


...in order to clean up.

ChameleonDave
July 5th, 2008, 03:35 AM
i reinstall ubuntu on my computer
and i have more than 200 package on a cd "i burn them as data cd "
is there a method to install them all together ?
not one by one
please help

I'd prefer not to install them all at once. Linux dependencies are a tricky thing. You'd also be installing old versions of a lot of software.

I'd just put them in /var/cache/apt/archives, open Synaptic, refresh, and mark all the software I wanted to install. Synaptic would then intelligently use those packages that were available locally, and download those packages that it needed to.

lio_013
July 5th, 2008, 08:48 PM
great but i dont know how to copy all of them to the folder by using the terminal?

ChameleonDave
July 6th, 2008, 02:47 AM
great but i dont know how to copy all of them to the folder by using the terminal?

Well, you don't have to use the terminal.

Let's say you're a GNOME and Nautilus user. Open up Nautilus as root. You can do that by typing "gksu nautilus" on the command line (I believe Ctrl + F2) opens one up in GNOME).

You can then navigate to your CD, copy, navigate to the archives directory, and paste.

######################

To do it entirely on the command line, you need to enter the exact path for both directories. For example:


sudo cp /media/cdrom/*.deb /var/cache/apt/archives/

Notice that there is an asterisk in the first path but not the second. The first path is to all of the files you want to move (the asterisk means "all"). The shell will expand that out to hundreds of entries. The last path is the directory where all that should be dumped.

You can also use "mv" instead of "cp".