kabads
Posts: 4
Joined: Sun Sep 23, 2012 8:52 am

Trying to upgrade getting errors

Sun Sep 23, 2012 12:17 pm

Fresh install of wheezy rasbian - just trying an initial apt-get update and getting this:

Code: Select all

pi@raspberrypi ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  python-rpi.gpio python3-rpi.gpio
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
11 not fully installed or removed.
Need to get 0 B/25.8 kB of archives.
After this operation, 27.6 kB of additional disk space will be used.
Do you want to continue [Y/n]?
(Reading database ... 57780 files and directories currently installed.)
Preparing to replace python-rpi.gpio 0.3.1a-1 (using .../python-rpi.gpio_0.4.0a-                                                                                        1_armhf.deb) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: error processing /var/cache/apt/archives/python-rpi.gpio_0.4.0a-1_armhf.de                                                                                        b (--unpack):
 there is no script in the new version of the package - giving up
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace python3-rpi.gpio 0.3.1a-1 (using .../python3-rpi.gpio_0.4.0                                                                                        a-1_armhf.deb) ...
Unpacking replacement python3-rpi.gpio ...
dpkg: error processing /var/cache/apt/archives/python3-rpi.gpio_0.4.0a-1_armhf.d                                                                                        eb (--unpack):
 trying to overwrite '/usr/lib/python3', which is also in package debconf 1.5.46
E: py3compile:183: cannot create directory /usr/lib/python3/dist-packages/RPi/__                                                                                        pycache__: OSError(20, 'Not a directory')
Errors were encountered while processing:
 /var/cache/apt/archives/python-rpi.gpio_0.4.0a-1_armhf.deb
 /var/cache/apt/archives/python3-rpi.gpio_0.4.0a-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any ideas about what is going wrong here?

kabads
Posts: 4
Joined: Sun Sep 23, 2012 8:52 am

Re: Trying to upgrade getting errors

Mon Sep 24, 2012 7:07 pm

bump

craig.francis
Posts: 1
Joined: Wed May 07, 2014 12:40 pm

Re: Trying to upgrade getting errors

Wed May 07, 2014 1:08 pm

If it's the same problem I had, then python3.2 may have been removed, or partially removed.

For some reason, simply running `python3.2` also showed the same error messages.

Now I have tried to re-install quite a few different things via apt-get, the one that seemed to work was:

Code: Select all

apt-get install --reinstall python3.2-minimal
As just re-installing `python3.2` implied everything was ok, and didn't seem to change anything, even though the /usr/lib/python3* folders did not exist.

Return to “Beginners”