PDA

View Full Version : dpkg Confused



none1
01-03-2004, 10:03 PM
I'm confused about the dpkg command.
Btw, I'm solemnly sorry but starting this thread as it has been done many time but I searched for answer but found nothing.
This is a freshly hd-installed Knoppix 3.3.

Ok like most I did "dpkg -i --force-overwrite libxcursor-dev_1.0.2-2_i386.deb" because "libxcursor-dev_1.0.2-2_i386.deb" is annoying.



root@box:~# dpkg -i --force-overwrite libxcursor-dev_1.0.2-2_i386.deb
dpkg: error processing libxcursor-dev_1.0.2-2_i386.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
libxcursor-dev_1.0.2-2_i386.deb

none1
01-03-2004, 10:07 PM
You might wonder what I was trying to do.
Simple, apt-get upgrade.

But then I got to this:



root@box:~# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
libqt3-mt-dev: Depends: libxcursor-dev but it is not installed
E: Unmet dependencies. Try using -f.



root@box:~# apt-get -f install
Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
libxcursor-dev
The following NEW packages will be installed:
libxcursor-dev
0 upgraded, 1 newly installed, 0 to remove and 320 not upgraded.
40 not fully installed or removed.
Need to get 0B/27.3kB of archives.
After unpacking 135kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 113041 files and directories currently installed.)
Unpacking libxcursor-dev (from .../libxcursor-dev_1.0.2-2_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libxcursor-dev_1.0.2-2_i386.deb (--unpack):
trying to overwrite `/usr/X11R6/include/X11/Xcursor/Xcursor.h', which is also in package xlibs-dev
Errors were encountered while processing:
/var/cache/apt/archives/libxcursor-dev_1.0.2-2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Stephen
01-03-2004, 10:39 PM
I'm confused about the dpkg command.
Btw, I'm solemnly sorry but starting this thread as it has been done many time but I searched for answer but found nothing.
This is a freshly hd-installed Knoppix 3.3.

Ok like most I did "dpkg -i --force-overwrite libxcursor-dev_1.0.2-2_i386.deb" because "libxcursor-dev_1.0.2-2_i386.deb" is annoying.



root@box:~# dpkg -i --force-overwrite libxcursor-dev_1.0.2-2_i386.deb
dpkg: error processing libxcursor-dev_1.0.2-2_i386.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
libxcursor-dev_1.0.2-2_i386.deb

And from the post below it:


Unpacking libxcursor-dev (from .../libxcursor-dev_1.0.2-2_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libxcursor-dev_1.0.2-2_i386.deb (--unpack):
trying to overwrite `/usr/X11R6/include/X11/Xcursor/Xcursor.h', which is also in package xlibs-dev


So you want to cd /var/cache/apt/archives then run the command to overwrite or use the absolute path in the command dpkg -i --force-overwrite /var/cache/apt/archives/libxcursor-dev_1.0.2-2_i386.deb.

none1
01-03-2004, 10:44 PM
Not sure if I did this correctly as I believe I did what should be required from you.



root@box:~# cd /var/cache/apt/archives
root@box:/var/cache/apt/archives# dpkg -i --force-overwrite /var/cache/apt/archives/libxcursor-dev_1.0.2-2_i386.deb
(Reading database ... 113041 files and directories currently installed.)
Unpacking libxcursor-dev (from .../libxcursor-dev_1.0.2-2_i386.deb) ...
dpkg - warning, overriding problem because --force enabled:
trying to overwrite `/usr/X11R6/include/X11/Xcursor/Xcursor.h', which is also in package xlibs-dev
dpkg: dependency problems prevent configuration of libxcursor-dev:
libxcursor-dev depends on libxcursor1 (= 1.0.2-2); however:
Package libxcursor1 is not configured yet.
libxcursor-dev depends on libc6-dev | libc-dev; however:
Package libc6-dev is not configured yet.
Package libc-dev is not installed.
Package libc6-dev which provides libc-dev is not configured yet.
dpkg: error processing libxcursor-dev (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libxcursor-dev

Stephen
01-03-2004, 10:54 PM
Not sure if I did this correctly as I believe I did what should be required from you.



root@box:~# cd /var/cache/apt/archives
root@box:/var/cache/apt/archives# dpkg -i --force-overwrite /var/cache/apt/archives/libxcursor-dev_1.0.2-2_i386.deb
(Reading database ... 113041 files and directories currently installed.)
Unpacking libxcursor-dev (from .../libxcursor-dev_1.0.2-2_i386.deb) ...
dpkg - warning, overriding problem because --force enabled:
trying to overwrite `/usr/X11R6/include/X11/Xcursor/Xcursor.h', which is also in package xlibs-dev
dpkg: dependency problems prevent configuration of libxcursor-dev:
libxcursor-dev depends on libxcursor1 (= 1.0.2-2); however:
Package libxcursor1 is not configured yet.
libxcursor-dev depends on libc6-dev | libc-dev; however:
Package libc6-dev is not configured yet.
Package libc-dev is not installed.
Package libc6-dev which provides libc-dev is not configured yet.
dpkg: error processing libxcursor-dev (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libxcursor-dev


Well thats certainly a mess you should try for the unconfigured dpkg --configure -a and maybe the apt-get -f install mentioned above in the message but before you do either see if it will complete your apt-get upgrade first it's best not to force to many things if you do not have to. If it starts complaining about an individual package being not install then try to use just apt-get install package_name then go back to the apt-get upgrade again rinse/repeat as necessary. BTW once you changed to the /archives directory you did not have to really use the entire directory in the path it would have found the package with the first shorter command you tried.

none1
01-04-2004, 12:06 AM
Thank you, it certainly did work.
I had to apt-get upgrade then update and then repeat over and over. I thought it was a once-a-process-to-do.
Thank you Stephen.

Stephen
01-04-2004, 12:46 AM
Thank you, it certainly did work.
I had to apt-get upgrade then update and then repeat over and over. I thought it was a once-a-process-to-do.
Thank you Stephen.

It usually is but where you had the error it had the package system was messed up and it had to work to correct it one thing you can try in the future instead of apt-get update try dselect update that syncs both the apt and dpkg databases so they both see the same thing installed it may not haved helped here but it is something to keep in mind for the future.

none1
01-04-2004, 12:59 AM
I do have another question.

To remove packages I do apt-get remove [packagename].

Now when I remove.. say game01 (just an example) it's gone from my system, right?

Now if I do apt-get update/upgrade, will it be installed again?

What does apt-get remove delete? EVERYTHING including the conf file? Or just the files but not the conf file?

Thanks again.

Stephen
01-04-2004, 02:20 AM
I do have another question.

To remove packages I do apt-get remove [packagename].

Now when I remove.. say game01 (just an example) it's gone from my system, right?

Now if I do apt-get update/upgrade, will it be installed again?

What does apt-get remove delete? EVERYTHING including the conf file? Or just the files but not the conf file?

Thanks again.

Once you remove the package apt will not try to re-install it unless some other package you want needs the package that you removed for itself to work. The remove just removes the package itself not the configuration files to do that you need apt-get --purge remove package_name there is all kinds of options you can use with apt-get you may want to use man apt-get in a console window, one of my favorites is the -s switch which simulates the action that apt will perform a sort of dry run so you can see the changes before you make them you should always use the -s then remove it from the line to actually take the action.

none1
01-04-2004, 09:23 PM
Ok I just want to confirm this.

If I want to completely remove something, I do the following:

apt-get remove [package]
dpkg -P [package]

Those two will completely remove the [package] off my system right?

Stephen
01-04-2004, 10:03 PM
Ok I just want to confirm this.

If I want to completely remove something, I do the following:

apt-get remove [package]
dpkg -P [package]

Those two will completely remove the [package] off my system right?

apt-get --purge remove [package] the other one is correct. There are times when the removal script fails and it will tell you that it could not remove a directory because it is not empty in that case you just remove it by hand with rm -rf /path/to/directory/that/failed/to/remove.

none1
01-07-2004, 12:55 AM
Heh, I guess I don't believe in posting new thread so I'll say here.

I have another problem.

It's those simple problems where most of us are bugged by the looks.

The desktop won't save its setting. :evil:
The CD-Rom Icon keeps moving itself to the topleft when I try to move it to the middle of the desktop.

The Hda1 Icon won't save its icon. I use another icon, then it reverts back to original when I reset the computer. I have to double click on it for it to revert to the one I want it to, and it's getting really annoying.

And the start-up screen (where there is a few icon that lights up after you log in) will not change, is there a way to permanently change it to your image?

Thanks.

PS: I also have a firewall called "Firestarter". The only problem I have with it is.. why is it that everytime I boot up I double click on the script, sometime it works, sometime it doesn't, what's wrong?