DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd December 2011
warudemaru warudemaru is offline
New User
 
Join Date: Dec 2010
Posts: 8
Default problem installing python from pkgs

I receive the following error on trying to install python
Code:
root:$> pkg_add -r python-2.5.4p13
Collision in bzip2-1.0.6: the following files already exist
        /usr/local/bin/bunzip2
        /usr/local/bin/bzcat
        /usr/local/bin/bzcmp
        /usr/local/bin/bzdiff (same checksum)
        /usr/local/bin/bzegrep
        /usr/local/bin/bzfgrep
        /usr/local/bin/bzgrep (same checksum)
        /usr/local/bin/bzip2 (different checksum)
        /usr/local/bin/bzip2recover (different checksum)
        /usr/local/bin/bzless
        /usr/local/bin/bzmore (same checksum)
        /usr/local/include/bzlib.h (different checksum)
        /usr/local/lib/libbz2.a (different checksum)
        /usr/local/lib/libbz2.so.10.4 (different checksum)
        /usr/local/share/doc/bzip2/manual.html (different checksum)
Can't install python-2.5.4p13: can't resolve bzip2-1.0.6
System is OpenBSD 5.0 being constantly upgraded since 4.7. I've never tried installing python before, and haven't spotted any changes regarding bzip2 during the former upgrades, or did I indeed miss something?
Is there any other solution than deleting all the files causing problem? It would be good that a "force" option in pkg_add exist to get away with such problems
Reply With Quote
  #2   (View Single Post)  
Old 3rd December 2011
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

The default Python for OpenBSD 5.0 is 2.7.2 (3.2 is also available as developer package). Why are you trying to install Python 2.5.4p13?
Reply With Quote
  #3   (View Single Post)  
Old 4th December 2011
warudemaru warudemaru is offline
New User
 
Join Date: Dec 2010
Posts: 8
Default

well the version actually doesn't matter, problem is the same, just pasted the console trying python-2.5 after python-2.7 didn't work
Reply With Quote
  #4   (View Single Post)  
Old 4th December 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

The collision is with bzip, not python.
Reply With Quote
  #5   (View Single Post)  
Old 4th December 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

OK, now that I've moved from a phone to a workstation, let me elaborate:
  1. bzip2's last upgrade was at 4.7-release: it was upgraded to 1.0.6.
  2. There was a revision of the port for 4.9-release, but it did not alter the binary executables in the package. USE_GROFF=YES was added to the port's Makefile.
  3. It appears that pkg_add is attempting to install bzip2, which is a run-time dependency for python. Your console output may not be complete; pkg_add produces output which will overlay existing text.
  4. It appears that bzip2 is already installed, although with different checksums.
There are several possible reasons for the collision and checksum errors.

The most likely cause is an incorrect $PKG_PATH -- either pointing to the wrong architecture (e.g.: i386 instead of amd64, or vice versa) or trying to use snapshot packages while running a -release.


Another cause could be a damaged or out-of-sync installed-package database -- pkg_add and pkg_delete manage this data base in file structures located in /var/db/pkg. Issuing $ pkginfo | grep bzip2 will show you if the database recognizes bzip2 as already installed or not. And then you can test any of the individually listed files with pkg_info -E to check the file against the database to determine which package installed it, such as $ pkg_info -E /usr/local/bin/bzip2

If your $PKG_PATH is confirmed to be correct, and bzip2 appears to be installed properly, there may have been a package signature change between -release packages for bzip; a simple # pkg_add -r bzip2 might solve the problem.

Last edited by jggimi; 4th December 2011 at 02:51 PM.
Reply With Quote
  #6   (View Single Post)  
Old 4th December 2011
warudemaru warudemaru is offline
New User
 
Join Date: Dec 2010
Posts: 8
Default

thanks for your elaborate answer this is what I've just tried:
the PKG_PATH is correct
Code:
root:$> echo $PKG_PATH
ftp://ftp.openbsd.org/pub/OpenBSD/5.0/packages/i386/
there is no package bzip2 installed, and installation issues the same collision error as by installing python (not surprisingly). The files look like somekind of orphaned files
Code:
root:$> pkg_info -E /usr/local/bin/bzip2
root:$> pkg_info | grep bzip2
root:$> ls -al /usr/local/bin/bz*                            
lrwxr-xr-x  1 root  wheel      5 Nov 16  2010 /usr/local/bin/bzcat -> bzip2
lrwxr-xr-x  1 root  wheel      6 Nov 16  2010 /usr/local/bin/bzcmp -> bzdiff
-r-xr-xr-x  1 root  bin     2128 Aug  9  2010 /usr/local/bin/bzdiff
lrwxr-xr-x  1 root  wheel      6 Nov 16  2010 /usr/local/bin/bzegrep -> bzgrep
lrwxr-xr-x  1 root  wheel      6 Nov 16  2010 /usr/local/bin/bzfgrep -> bzgrep
-r-xr-xr-x  1 root  bin     1677 Aug  9  2010 /usr/local/bin/bzgrep
-r-xr-xr-x  1 root  bin    30452 Aug  9  2010 /usr/local/bin/bzip2
-r-xr-xr-x  1 root  bin    10708 Aug  9  2010 /usr/local/bin/bzip2recover
lrwxr-xr-x  1 root  wheel      6 Nov 16  2010 /usr/local/bin/bzless -> bzmore
-r-xr-xr-x  1 root  bin     1259 Aug  9  2010 /usr/local/bin/bzmore
so it seems like removing all causing problem files and installing bzip2 will solve the problem but now where are these files coming from??
Reply With Quote
  #7   (View Single Post)  
Old 4th December 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Your package database and your installed packages are out of sync. I cannot tell you why, but I can at least tell you what I see here.

I misinterpreted what I saw in the cvs log for bzip2's Makefile, because August 9 2010 was the build date for the i386 bzip2-1.0.5 package for 4.8-release. Therefore, some of these existing files are from that package.

The i386 package for bzip2-1.0.6 for 4.9-release was built February 16 2011, and none of them are on your system.

You have some files dated November 16 2010, source unknown.

--------

If it were me, I would make a clean install of the OS, since something has occurred that caused this inconsistency. As to root cause, I would look to administrative changes you made a year ago, or any installs/deinstalls at that time.
Reply With Quote
  #8   (View Single Post)  
Old 7th December 2011
warudemaru warudemaru is offline
New User
 
Join Date: Dec 2010
Posts: 8
Default

Quote:
Originally Posted by jggimi View Post
The i386 package for bzip2-1.0.6 for 4.9-release was built February 16 2011, and none of them are on your system.[...] You have some files dated November 16 2010, source unknown.
That's it! I checked out all the checksums, and it revealed that the files are coming from bzip2-1.0.5 package from 4.8-RELEASE, something must have gone wrong by the time of upgrade to 4.9, but I don't remember anything, anyway after removing these out of sync files python installation went smoothly on, bringing the right bzip version as well. I couldn't afford making a clean OS install right now so I'll just stay to what I got, but I'm aware of what could be the reason of potential tricky problems in the future.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing 2nd nekwork card kiimao OpenBSD Installation and Upgrading 10 12th August 2011 12:20 AM
Installing python imaging on OpenBSD ? [error _imagingft C module] Barakat OpenBSD Packages and Ports 8 8th April 2011 01:35 AM
problem installing linux comat whispersGhost FreeBSD Ports and Packages 0 20th January 2009 01:03 AM
Problem with installing FreeBSD 7.0 Stable likemandrake FreeBSD General 2 5th October 2008 08:16 AM
Problem installing PHP5 DrKrall OpenBSD Packages and Ports 8 23rd May 2008 12:10 AM


All times are GMT. The time now is 08:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick