Hello!

Thanks for looking into this.

Summary:

After following your advice to reinstall the affected packages (apt-get
--reinstall install python python-minimal python-ldap luma) the problem
disappeared.

Details (in chronological order as I tried what you wrote):

r...@prana:~$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 2009-02-19 11:18 /usr/bin/python -> python2.5
r...@prana:~$ dpkg -S /usr/bin/python
python-minimal: /usr/bin/python
r...@prana:~$ dpkg -l python-minimal
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                                           Version                      
                  Description
+++-==============================================-==============================================-============================================================================================================
ii  python-minimal                                 2.5.2-3                      
                  A minimal subset of the Python language (default version)
r...@prana:~$ python -c "import ldap"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named ldap
r...@prana:~$ 

> Did you install Packages from other sources than debian.org?

Yes, but nothing related to Python.

I suspect the problem might be related to my machine having been
upgraded from etch to lenny. Something was probably not correctly
"rewired" around the ldap module.

> It might be useful to reinstall all related packages from debian.org!
> 
> "apt-get --reinstall install python python-minimal python-ldap luma
> python2.5 python2.5-minimal"

This fixed it.

Here is the output:

r...@prana:~$ sudo apt-get --reinstall install python python-minimal 
python-ldap luma
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/1034kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 184646 files and directories currently installed.)
Preparing to replace python 2.5.2-3 (using .../python_2.5.2-3_all.deb) ...
Unpacking replacement python ...
Preparing to replace python-minimal 2.5.2-3 (using 
.../python-minimal_2.5.2-3_all.deb) ...
Unpacking replacement python-minimal ...
Preparing to replace python-ldap 2.3.5-1 (using 
.../python-ldap_2.3.5-1_i386.deb) ...
Unpacking replacement python-ldap ...
Preparing to replace luma 2.3-1.1 (using .../archives/luma_2.3-1.1_all.deb) ...
Unpacking replacement luma ...
Processing triggers for man-db ...
Setting up python-minimal (2.5.2-3) ...
Setting up python (2.5.2-3) ...
Setting up python-ldap (2.3.5-1) ...
Setting up luma (2.3-1.1) ...
r...@prana:~$ python -c "import ldap"
r...@prana:~$ 

Have a nice day,

Balazs Ruzsa
Hungary


At Sat, 21 Nov 2009 21:13:52 +0100,
Per Wawra wrote:
> 
> I can not reproduce your problem.
> It seems to be a python vs. python-ldap problem on your machine.
> On Lenny python defaults to python2.5.
> "import ldap" should work flawlessly on python2.5!
> 
> "ls -l /usr/bin/python" should result in "/usr/bin/python -> python2.5"
> "dpkg -S /usr/bin/python" should result in "python-minimal"
> "dpkg -l python-minimal" should result in "2.5.2-3"
> '''python -c "import ldap"''' should return nothing
> 
> Did you install Packages from other sources than debian.org?
> 
> It might be useful to reinstall all related packages from debian.org!
> 
> "apt-get --reinstall install python python-minimal python-ldap luma
> python2.5 python2.5-minimal"
> 
> Please report if your problem still exists!
> 
> If yes, please also send the output of "dpkg-query -W -f='${Package}
> ${Version}\n'|grep python"
> 



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to