LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-16-2004, 09:19 AM   #1
Larke
LQ Newbie
 
Registered: Apr 2004
Distribution: Fedora Core
Posts: 16

Rep: Reputation: 0
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?
 
Old 04-16-2004, 03:34 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
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.
 
Old 04-17-2004, 10:57 AM   #3
jon-do
Member
 
Registered: Feb 2004
Distribution: Red 9, FC 2 Test 3
Posts: 98

Rep: Reputation: 16
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
 
Old 04-17-2004, 02:46 PM   #4
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
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
 
Old 05-05-2004, 03:02 PM   #5
Jeff Cours
LQ Newbie
 
Registered: May 2004
Distribution: Fedora and Debian
Posts: 3

Rep: Reputation: 0
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
 
Old 05-05-2004, 06:09 PM   #6
jon-do
Member
 
Registered: Feb 2004
Distribution: Red 9, FC 2 Test 3
Posts: 98

Rep: Reputation: 16
what is the output of
Code:
 apt-get check
from a shell.

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

Last edited by jon-do; 05-05-2004 at 06:22 PM.
 
Old 05-05-2004, 07:30 PM   #7
Jeff Cours
LQ Newbie
 
Registered: May 2004
Distribution: Fedora and Debian
Posts: 3

Rep: Reputation: 0
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.
 
Old 05-06-2004, 12:27 PM   #8
jon-do
Member
 
Registered: Feb 2004
Distribution: Red 9, FC 2 Test 3
Posts: 98

Rep: Reputation: 16
Okay after some brain storming, I came up with this
reboot and from a shell as superuser
Code:
updatedb
rpm -qa |grep [a-z,A-Z] > rpmdb.txt
sort -g rpmdb.txt > rpmsort.txt
Hopefully you have a text file rpmsort.txt, you can edit and it will show your duplicate packages

Last edited by jon-do; 05-06-2004 at 01:11 PM.
 
Old 05-06-2004, 02:08 PM   #9
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
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.
 
Old 05-06-2004, 02:57 PM   #10
Jeff Cours
LQ Newbie
 
Registered: May 2004
Distribution: Fedora and Debian
Posts: 3

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(FreeBSD && Fedora Core 4 && Slackware 10.0) Filesystem Support taylor_venable *BSD 1 07-14-2005 02:24 PM
SLES8 & apt-get phonecian Linux - Enterprise 1 08-03-2004 07:34 AM
How to 'apt-cache search' & 'apt-file search' by distribution? davidas Debian 3 04-19-2004 01:56 PM
Where is apt & Synaptic foxpoint11 Fedora 0 11-09-2003 01:03 PM
APT & Mozilla &Macromedia Flash Pedroski Linux - Software 6 10-18-2003 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration