Fedora & apt-get
I installed apt-get (yum install apt) or something.
I get some error, when i tried to update: This package won't be cleanly updated, unless you leave only one version. To leave multiple versions installed, you may remove that warning by setting the following option in your configuration file: RPM::Allow-Duplicated { "^initscripts$"; }; To disable these warnings completely set: RPM::Allow-Duplicated-Warning "false"; W: There are multiple versions of "gphoto2" in your system. This package won't be cleanly updated, unless you leave only one version. To leave multiple versions installed, you may remove that warning by setting the following option in your configuration file: I have mulpiple versions of many files, in my systems.. how can i edit those files? |
I think I've seen this a time or two... When I changed repositories, maybe. I think it said to run "apt-get update" to fix it.
|
This will be much easier if you have synaptic. Try apt-get -y install synaptic at a command line. If apt-get allows you to install synaptic which is a gui interface for apt-get. Then just run synaptic and find the duplicate package and delete the old one
or I am taking "initscripts" as an example at root #rpm -qa |grep initscripts This will list all initscripts you have installed # rpm -e initscriptsXXXXXX.rpm The XXXXXX is the exact package name you want to remove which is usually the older package repeat for the rest of the duplicate packages |
If you refer to apt as provided by http://fedora.us and if you don't use any 3rd party package repositories which cause the problems, please submit a bug report at http://bugzilla.fedora.us
|
Is there a way to get synaptic's filter to show duplicate packages?
How I got here: 1. I upgraded a rarely used machine using synaptic. The upgrade hung near the end and I had to ctrl-C it. 2. When I next launched synaptic, it gave me a large warning dialog about duplicate packages. Unfortunately, the dialog was large enough that it went off the displayable area of the screen. With IceWM, I couldn't find a way to get to the stuff near the end. 3. When I searched for the one or two packages I saw and remembered, I was able to see that they were duplicates and could remove one of the duplicate entries. However, the "find" function doesn't seem to want to accept the "#" sign that synaptic uses for duplicates, nor does it seem to accept a regexp. 4. Relaunching synaptic doesn't regenerate the warning message, so the "remove the first few, then launch again and remove the next few" approach doesn't seem to be an option. I'm currently working around the problem by doing this rather grotty incantation: rpm -qa | sed 's/[0-9].*$//' | sort | uniq -d -c and manually looking for duplicates in the list it gives me, but since synaptic already knows the duplicate packages, I was wondering if there was some way to get it to tell me. Fedora Core 1 2.4.22-1.2174.nptl i686 apt-0.5.15cnc6-0.1.fc1.fr synpatic-0.48.2-1.1.fc1.fr AND synaptic-0.47-1.fr (it's one of the duplicates and shows its own version as 0.46 -- go figure) Currently, the only repository synaptic lists is http://ayo.freshrpms.net for distro fedora/linux/1/i386. (If there's a better one that tracks Core 1, rather than pushing me into Core 2, please let me know. I can't run Core 2 on this particular machine until it's declared a stable release.) TIA - Jeff |
what is the output of
Code:
apt-get check Answer to you last question for repositories # Fedora Core (Kernel.org, San Francisco California, USA) rpm http://mirrors.kernel.org/fedora.us/fedora/ fedora/1/i386 os updates # rpm-src http://mirrors.kernel.org/fedora.us/fedora/ fedora/1/i386 os update s # Fedora Core (University of Hawaii Honolulu, Hawaii, USA) rpm http://download.fedora.us/fedora/ fedora/1/i386 os updates # rpm-src http://download.fedora.us/fedora/ fedora/1/i386 os updates # Fedora Extras (Kernel.org, San Francisco California, USA) rpm http://mirrors.kernel.org/fedora.us/fedora/ fedora/1/i386 stable # rpm-src http://mirrors.kernel.org/fedora.us/fedora/ fedora/1/i386 stable # Fedora Extras (University of Hawaii Honolulu, Hawaii, USA) rpm http://download.fedora.us/fedora/ fedora/1/i386 stable # rpm-src http://download.fedora.us/fedora/ fedora/1/i386 stable |
Thanks for the sources -- I'll go ahead and add them.
As for the output of apt-get check, it depends on who I am: [jtcn@dhcp-64-213 jtcn]$ sudo apt-get check Password: Reading Package Lists... Done Building Dependency Tree... Done [jtcn@dhcp-64-213 jtcn]$ apt-get check error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages index using db3 - Operation not permitted (1) error: cannot open Packages database in /var/lib/rpm E: could not open RPM database [jtcn@dhcp-64-213 jtcn]$ ls /var/lib/rpm/__db.* /var/lib/rpm/__db.001 /var/lib/rpm/__db.002 /var/lib/rpm/__db.003 [jtcn@dhcp-64-213 jtcn]$ ps -ef | egrep -e '(rpm)|(apt)' jtcn 2321 2275 0 17:23 pts/3 00:00:00 egrep -e (rpm)|(apt) Same results if I manually remove RPM's __db files, plus apt recreates them: [jtcn@dhcp-64-213 jtcn]$ sudo rm /var/lib/rpm/__db.* [jtcn@dhcp-64-213 jtcn]$ apt-get check error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages index using db3 - Operation not permitted (1) error: cannot open Packages database in /var/lib/rpm E: could not open RPM database [jtcn@dhcp-64-213 jtcn]$ sudo !! sudo apt-get check Reading Package Lists... Done Building Dependency Tree... Done [jtcn@dhcp-64-213 jtcn]$ [jtcn@dhcp-64-213 jtcn]$ ls -l /var/lib/rpm/__db.* -rw-r--r-- 1 root root 16384 May 5 17:26 /var/lib/rpm/__db.001 -rw-r--r-- 1 root root 1318912 May 5 17:26 /var/lib/rpm/__db.002 -rw-r--r-- 1 root root 458752 May 5 17:26 /var/lib/rpm/__db.003 I've been removing duplicates wherever I could find them, so that may be affecting the output. |
Okay after some brain storming, I came up with this
reboot and from a shell as superuser Code:
updatedb |
Hi jon-do!
updatedb has nothing whatsoever to do with RPM. rpm -qa --qf "%{name}\n" | sort | uniq -d | xargs rpm -q lists duplicate packages. You can leave out the xargs at the end. |
That did the trick -- thanks!
For others who wind up following this thread in the future, adding this step to the recipe you mentioned will highlight possible duplicates: cat rpmsort.txt | sed 's/-[0-0].*//' | uniq -d It produces some false positives (notably, Kernel and XFree86), but it gives a good place to start looking. |
All times are GMT -5. The time now is 10:00 PM. |