LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 01-21-2014, 03:52 AM   #1
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,604

Rep: Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242
cannot install python2.7-dev


Hi guys, I have a debian wheezy stable (more or less) uptodate.
I originally installed sqeeze and it was updated/upgraded time by time.
But the package management system is not ok, something went wrong and I have no idea what's happened and how to fix it.

Actually I tried to install python2.7-dev (the version available is 2.7.3-6). I downloaded the package from http://packages.debian.org.
The answer was:
Code:
The following packages have unmet dependencies:
 python2.7-dev : Depends: python2.7 (= 2.7.3-6) but 2.7.3-8 is to be installed
                 Depends: libpython2.7 (= 2.7.3-6) but 2.7.3-8 is to be installed
So somehow I have 2.7.3-8 installed (of python2.7 and libpython2.7).
Can someone tell me a solution? Try to install it from jessie? Force downgrade to 2.7.3-6? Try to find a compatible version?

here is my source.list:
Code:
# 

# deb cdrom:[Debian GNU/Linux 6.0.7 _Squeeze_ - Official amd64 NETINST Binary-1 20130223-18:50]/ squeeze main
# deb cdrom:[Debian GNU/Linux 6.0.7 _Squeeze_ - Official amd64 NETINST Binary-1 20130223-18:50]/ squeeze main

#deb http://ftp.hu.debian.org/debian/ squeeze main non-free contrib
#deb-src http://ftp.hu.debian.org/debian/ squeeze main non-free contrib

deb http://ftp.debian.org/debian/ wheezy main non-free contrib
deb-src http://ftp.debian.org/debian/ wheezy main non-free contrib

#deb http://ftp.hu.debian.org/debian/ experimental main
#deb-src http://ftp.hu.debian.org/debian/ experimental main


#deb http://ftp.hu.debian.org/debian/ sid main non-free contrib
#deb-src http://ftp.hu.debian.org/debian/ sid main non-free contrib

# squeeze-updates, previously known as 'volatile'
#deb http://ftp.hu.debian.org/debian/ squeeze-updates main
#deb-src http://ftp.hu.debian.org/debian/ squeeze-updates main

#deb http://backports.debian.org/debian-backports wheezy-backports main
deb http://mozilla.debian.net/ wheezy-backports iceweasel-release

#deb http://www.deb-multimedia.org wheezy main non-free
#deb http://www.deb-multimedia.org experimental main
Thanks
 
Old 01-21-2014, 05:37 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,436
Blog Entries: 11

Rep: Reputation: 181Reputation: 181
By looking at your sources.list I would not be asthoned if you have mixed packages from different versions.

So whats the output of
Quote:
dpkg --audit
Have you tried
Quote:
apt-get install python2.7-dev
 
Old 01-21-2014, 05:48 AM   #3
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,604

Original Poster
Rep: Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242
dpkg --audit returns nothing.
Code:
#  apt-get install python2.7-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python2.7-dev : Depends: python2.7 (= 2.7.3-6) but 2.7.3-8 is to be installed
                 Depends: libpython2.7 (= 2.7.3-6) but 2.7.3-8 is to be installed
E: Unable to correct problems, you have held broken packages.
Code:
# dpkg -l python python2.7
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
+++-===============================-====================-====================-====================================================================
ii  python                          2.7.3-4+deb7u1       all                  interactive high-level object-oriented language (default version)
ii  python2.7                       2.7.3-8              amd64                Interactive high-level object-oriented language (version 2.7)
 
Old 01-21-2014, 07:03 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,436
Blog Entries: 11

Rep: Reputation: 181Reputation: 181
I check this on my wheezy box
Quote:
root@VM-box-2:~# dpkg -l python python2.7
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=================================-=====================-=====================-===============
ii python 2.7.3-4+deb7u1 all interactive high-level object-oriented language (default version)
ii python2.7 2.7.3-6 amd64 Interactive high-level object-oriented language (version 2.7)
Also check packages.debian.org but did not find 2.7.3.* anywhere else then wheezy. Testing, unstable all go higher. Either you have it from sometime when testing had 2.7.3.8 or some other respositories. Or maybe a dpkg installation. Some apt-pinning on the road maybe. All I can say that the installed version of python2.7 is showing the wrong version.

Thus you can either try to correct this by removing python2.7 and reinstall. Hoping that the version magicaly align. Or dpkg --force-depends to just have it installed.
 
Old 01-21-2014, 08:26 AM   #5
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 968

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by zhjim View Post
Thus you can either try to correct this by removing python2.7 and reinstall.
Yes, that's what I'd do. Or rather force a direct downgrade (since by removing it the system could attempt to remove other important packages)?:

Code:
dpkg --force-downgrade -i python2.7*.deb libpython2.7*.deb
(You need to substitute the packages for the target packages and versions).

Let's cross fingers so there are not other packages that depend on this version of python2.7 and libpython2.7 .
 
Old 01-21-2014, 10:37 AM   #6
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,604

Original Poster
Rep: Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242
that made it worse: now I have:
Code:
# synaptic
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
 
Old 01-21-2014, 12:53 PM   #7
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 968

Rep: Reputation: 282Reputation: 282Reputation: 282
Sorry to hear that, pan64. Probably there are other packages that depend on python2.7 and libpython2.7 version 2.7.3-8. You might want to force the installation of this version of the packages. Of course, you will probably go back to the initial problem, but other than a downgrade, I'm not sure how to solve this issue.

This is not an easy task, but maybe tracking down all the packages that depend in python2.7 and libpython2.7, v. 2.7.3-8, removing them and reinstalling them from Stable?
 
Old 01-22-2014, 12:17 AM   #8
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,604

Original Poster
Rep: Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242
no, removing is not an option it will probably remove almost everything (for example gnome). donwgrade may solve this issue, but I need to find out which packages should be reinstalled. Is there a way to check if a package belongs to the stable release or something else?
 
Old 01-22-2014, 02:01 AM   #9
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,436
Blog Entries: 11

Rep: Reputation: 181Reputation: 181
Two things might help.

For individual packages use apt-cache policy pkgname. This shows the priority of repositories for the package. Also I'm not sure if shows the actuall origin.

The other one if apt-cache showpkg pkgname | head. Which shows the /var/lib/apt/lists directory. Withtin are the package list of (all) used repositories. I guess I grep within might give.
 
Old 01-22-2014, 02:30 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,509
Blog Entries: 2

Rep: Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018
Why would you even start to force install different versions when you have to trouble shoot version mismatches?
You told us in the initial post that you have a
Quote:
debian wheezy stable (more or less) uptodate.
That would have been my initial point to start with. What do you even mean with more or less up to date? Have you tried to make a full system upgrade when you encountered the version mismatches and then tried to install again?

OFFTOPIC: Looking at your sources.list, is there any specific reason you don't have Debian's security repo in there?

Last edited by TobiSGD; 01-22-2014 at 02:32 AM.
 
Old 01-22-2014, 02:43 AM   #11
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,604

Original Poster
Rep: Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242Reputation: 1242
I have installed sqeeze and upgraded/updated several times. As you see some of the packages have higher versions (compared to the actual stable) therefore apt-get update and apt-get upgrade do nothing. For example I do not know how python 2.7.3-8 was installed.

(OFF: I don't know about that security repo at all, it is basically the default install)
 
  


Reply

Tags
python debian install


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
[SOLVED] Trying to install 'Gmail Backup' but it requires python2.5 - I have python2.8... Robert.Thompson Slackware 6 05-10-2011 08:23 AM
Python2.5-devel is unable to find installed Python2.5 Setya Suse/Novell 1 06-08-2007 01:35 AM
Install of Python2.4 on RHEL ES 4 chtaylo3 Red Hat 1 10-20-2006 07:14 AM
Install python2.4 elopee Programming 7 02-01-2005 12:14 PM
Can't install python2.3 on RH9 SheldonPlankton Linux - Software 0 08-26-2004 12:21 PM


All times are GMT -5. The time now is 01:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration