KevF
Posts: 5
Joined: Tue Dec 26, 2017 12:20 am

Problem during sudo apt-get dist-upgrade (Pi B+)

Tue Dec 26, 2017 12:32 am

I'm a total Linux beginner trying to update my python & GPIO packages
I tried an upgrade via the sudo apt-get dist-upgrade command but ran into problems .......

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libpython2.7 : Depends: python2.7 (= 2.7.3-6+deb7u4) but 2.7.3-6+deb7u2 is installed
libpython3.2 : Depends: python3.2 (= 3.2.3-7+deb7u1) but 3.2.3-7 is installed
python2.7 : Depends: python2.7-minimal (= 2.7.3-6+deb7u2) but 2.7.3-6+deb7u4 is installed
python2.7-dev : Depends: python2.7 (= 2.7.3-6+deb7u4) but 2.7.3-6+deb7u2 is installed
Depends: libexpat1-dev but it is not installed
python3.2 : Depends: python3.2-minimal (= 3.2.3-7) but 3.2.3-7+deb7u1 is installed
python3.2-dev : Depends: python3.2 (= 3.2.3-7+deb7u1) but 3.2.3-7 is installed
Depends: libexpat1-dev but it is not installed
E: Unmet dependencies. Try using -f.


I tried $ sudo apt-get -f install but then get unpacking problems .......

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libexpat1-dev python2.7 python3.2
Suggested packages:
python2.7-doc python3.2-doc
The following NEW packages will be installed:
libexpat1-dev
The following packages will be upgraded:
python2.7 python3.2
2 upgraded, 1 newly installed, 0 to remove and 197 not upgraded.
12 not fully installed or removed.
Need to get 5,386 kB of archives.
After this operation, 176 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python2.7 armhf 2.7.3-6+deb7u4 [2,671 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python3.2 armhf 3.2.3-7+deb7u1 [2,504 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libexpat1-dev armhf 2.1.0-1+deb7u5 [211 kB]
Fetched 5,386 kB in 4s (1,105 kB/s)
(Reading database ... 77277 files and directories currently installed.)
Preparing to replace python2.7 2.7.3-6+deb7u2 (using .../python2.7_2.7.3-6+deb7u4_armhf.deb) ...
Unpacking replacement python2.7 ...
dpkg: error processing /var/cache/apt/archives/python2.7_2.7.3-6+deb7u4_armhf.deb (--unpack):
trying to overwrite '/usr/share/menu', which is also in package pcmanfm 1.2.3-1+raspi
Preparing to replace python3.2 3.2.3-7 (using .../python3.2_3.2.3-7+deb7u1_armhf.deb) ...
Unpacking replacement python3.2 ...
dpkg: error processing /var/cache/apt/archives/python3.2_3.2.3-7+deb7u1_armhf.deb (--unpack):
trying to overwrite '/usr/share/menu', which is also in package pcmanfm 1.2.3-1+raspi
Unpacking libexpat1-dev (from .../libexpat1-dev_2.1.0-1+deb7u5_armhf.deb) ...
dpkg: error processing /var/cache/apt/archives/libexpat1-dev_2.1.0-1+deb7u5_armhf.deb (--unpack):
trying to overwrite '/usr/share/doc-base', which is also in package findutils 4.4.2-4
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for menu ...
Errors were encountered while processing:
/var/cache/apt/archives/python2.7_2.7.3-6+deb7u4_armhf.deb
/var/cache/apt/archives/python3.2_3.2.3-7+deb7u1_armhf.deb
/var/cache/apt/archives/libexpat1-dev_2.1.0-1+deb7u5_armhf.deb


Can anyone help ?

fruitoftheloom
Posts: 20769
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Problem during sudo apt-get dist-upgrade (Pi B+)

Tue Dec 26, 2017 7:46 am

KevF wrote:
Tue Dec 26, 2017 12:32 am
I'm a total Linux beginner trying to update my python & GPIO packages
I tried an upgrade via the sudo apt-get dist-upgrade command but ran into problems .......

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libpython2.7 : Depends: python2.7 (= 2.7.3-6+deb7u4) but 2.7.3-6+deb7u2 is installed
libpython3.2 : Depends: python3.2 (= 3.2.3-7+deb7u1) but 3.2.3-7 is installed
python2.7 : Depends: python2.7-minimal (= 2.7.3-6+deb7u2) but 2.7.3-6+deb7u4 is installed
python2.7-dev : Depends: python2.7 (= 2.7.3-6+deb7u4) but 2.7.3-6+deb7u2 is installed
Depends: libexpat1-dev but it is not installed
python3.2 : Depends: python3.2-minimal (= 3.2.3-7) but 3.2.3-7+deb7u1 is installed
python3.2-dev : Depends: python3.2 (= 3.2.3-7+deb7u1) but 3.2.3-7 is installed
Depends: libexpat1-dev but it is not installed
E: Unmet dependencies. Try using -f.


I tried $ sudo apt-get -f install but then get unpacking problems .......

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libexpat1-dev python2.7 python3.2
Suggested packages:
python2.7-doc python3.2-doc
The following NEW packages will be installed:
libexpat1-dev
The following packages will be upgraded:
python2.7 python3.2
2 upgraded, 1 newly installed, 0 to remove and 197 not upgraded.
12 not fully installed or removed.
Need to get 5,386 kB of archives.
After this operation, 176 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python2.7 armhf 2.7.3-6+deb7u4 [2,671 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python3.2 armhf 3.2.3-7+deb7u1 [2,504 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libexpat1-dev armhf 2.1.0-1+deb7u5 [211 kB]
Fetched 5,386 kB in 4s (1,105 kB/s)
(Reading database ... 77277 files and directories currently installed.)
Preparing to replace python2.7 2.7.3-6+deb7u2 (using .../python2.7_2.7.3-6+deb7u4_armhf.deb) ...
Unpacking replacement python2.7 ...
dpkg: error processing /var/cache/apt/archives/python2.7_2.7.3-6+deb7u4_armhf.deb (--unpack):
trying to overwrite '/usr/share/menu', which is also in package pcmanfm 1.2.3-1+raspi
Preparing to replace python3.2 3.2.3-7 (using .../python3.2_3.2.3-7+deb7u1_armhf.deb) ...
Unpacking replacement python3.2 ...
dpkg: error processing /var/cache/apt/archives/python3.2_3.2.3-7+deb7u1_armhf.deb (--unpack):
trying to overwrite '/usr/share/menu', which is also in package pcmanfm 1.2.3-1+raspi
Unpacking libexpat1-dev (from .../libexpat1-dev_2.1.0-1+deb7u5_armhf.deb) ...
dpkg: error processing /var/cache/apt/archives/libexpat1-dev_2.1.0-1+deb7u5_armhf.deb (--unpack):
trying to overwrite '/usr/share/doc-base', which is also in package findutils 4.4.2-4
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for menu ...
Errors were encountered while processing:
/var/cache/apt/archives/python2.7_2.7.3-6+deb7u4_armhf.deb
/var/cache/apt/archives/python3.2_3.2.3-7+deb7u1_armhf.deb
/var/cache/apt/archives/libexpat1-dev_2.1.0-1+deb7u5_armhf.deb


Can anyone help ?

You need to synch the repositories first with update in Raspbian

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot

What Raspbian release are you running ??
Retired disgracefully.....

KevF
Posts: 5
Joined: Tue Dec 26, 2017 12:20 am

Re: Problem during sudo apt-get dist-upgrade (Pi B+)

Tue Dec 26, 2017 10:56 am

Thanks for your quick reply.
I'm running Linux raspberrypi 3.12.35+ #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l

I tried sudo apt-get update before sudo apt-get dist-upgrade but got the same messages:

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libpython2.7 : Depends: python2.7 (= 2.7.3-6+deb7u4) but 2.7.3-6+deb7u2 is installed
libpython3.2 : Depends: python3.2 (= 3.2.3-7+deb7u1) but 3.2.3-7 is installed
python2.7 : Depends: python2.7-minimal (= 2.7.3-6+deb7u2) but 2.7.3-6+deb7u4 is installed
python2.7-dev : Depends: python2.7 (= 2.7.3-6+deb7u4) but 2.7.3-6+deb7u2 is installed
Depends: libexpat1-dev but it is not installed
python3.2 : Depends: python3.2-minimal (= 3.2.3-7) but 3.2.3-7+deb7u1 is installed
python3.2-dev : Depends: python3.2 (= 3.2.3-7+deb7u1) but 3.2.3-7 is installed
Depends: libexpat1-dev but it is not installed
E: Unmet dependencies. Try using -f.


I then tried a reboot followed by sudo apt-get -f dist-upgrade which retrieved a lot of files and seemed to be working but then stopped with -

Preparing to replace libc-bin 2.13-38+rpi2+deb7u3 (using .../libc-bin_2.13-38+rpi2+deb7u12_armhf.deb) ...
Unpacking replacement libc-bin ...
dpkg: error processing /var/cache/apt/archives/libc-bin_2.13-38+rpi2+deb7u12_armhf.deb (--unpack):
trying to overwrite '/usr/share/man/man5', which is also in package ncurses-bin 5.9-10
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/libc-bin_2.13-38+rpi2+deb7u12_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


I'd prefer not to have to re-image if at all possible as I recall it took me a while to get the wifi configuration set-up and working
I'm running headless over putty if that makes any difference

Thanks

beta-tester
Posts: 1237
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Problem during sudo apt-get dist-upgrade (Pi B+)

Tue Dec 26, 2017 1:14 pm

isn't it better to do an upgrade first, to upgrade all installed packages of your current installed raspbian-wheezy
befor doing a distribution upgrade to the new raspbian-stretch via dist-upgrade?

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo reboot
and then if you still want to upgrade to a new distribution (raspbian-stretch) do

Code: Select all

sudo apt-get dist-upgrade
but you maybe have screwed up your installation already... :?

did you only wanted to upgrade the packages only or did you tried to upgrade to a new distribution?

when you have a second sd card, then start with that and a fresh installation. setting up wifi on raspbian-stretch is easier then it was two distributions befor on raspbian-wheezy i think.

BTW: stupid question... is your file system expanded to the whole SD card?
i think under the old raspbian wheezy, you have to expand the file system by hand first to have enough space (via using raspi-config)
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B, RPi3B, RPi3B+, RPiZeroW, ...

KevF
Posts: 5
Joined: Tue Dec 26, 2017 12:20 am

Re: Problem during sudo apt-get dist-upgrade (Pi B+)

Tue Dec 26, 2017 4:53 pm

Hi beta,
I tried update then upgrade, reboot and then dist-upgrade but still same issues

TBH I only wanted to update my python / GPIO related packages but read somehwere online about doing the dist-upgrade so tried that. So looks like the installation is perma-messed :-( !

Checked raspi-config re. expanding and got a message about partition layout not being supported but probs running NOOBS which is fully expanded anyway

Unless anyone has any better suggestions I'll go hunting for another sd card and try a fresh install

beta-tester
Posts: 1237
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Problem during sudo apt-get dist-upgrade (Pi B+)

Tue Dec 26, 2017 7:04 pm

next time, if you simply want to update a single package then you can use

Code: Select all

sudo apt-get update
sudo apt-get install --only-upgrade python
(for upgrade python only)

BTH: i think you can't make your installation even worse...
try to install the missing package by hand

Code: Select all

sudo apt-get install libexpat1-dev
or use more advances options to fix the installation, remove and clean up unused packages

Code: Select all

sudo apt-get install --fix-broken --fix-missing
sudo apt-get autoremove --purge
sudo apt-get autoclean
sudo apt-get clean
you can also try to reinstall the packages with combination of fix...

Code: Select all

sudo apt-get install --reinstall --fix-broken --fix-missing libc-bin
sudo apt-get install --reinstall --fix-broken --fix-missing python
sudo apt-get install --reinstall --fix-broken --fix-missing python2.7
sudo apt-get install --reinstall --fix-broken --fix-missing python3.2
but i am wondering, why you get errors while umpacking.
Last edited by beta-tester on Tue Dec 26, 2017 7:27 pm, edited 1 time in total.
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B, RPi3B, RPi3B+, RPiZeroW, ...

KevF
Posts: 5
Joined: Tue Dec 26, 2017 12:20 am

Re: Problem during sudo apt-get dist-upgrade (Pi B+)

Tue Dec 26, 2017 7:25 pm

ok thanks - I'll persevere a bit longer (always prefer trying to fix things rather than throwing them out and buying new !)
I'll post how I get on

Cheers

User avatar
DougieLawson
Posts: 36178
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Problem during sudo apt-get dist-upgrade (Pi B+)

Tue Dec 26, 2017 7:41 pm

Try installing synaptic or aptitude and using one of those tools to resolve all of your broken packages.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

KevF
Posts: 5
Joined: Tue Dec 26, 2017 12:20 am

Re: Problem during sudo apt-get dist-upgrade (Pi B+)

Wed Dec 27, 2017 3:43 pm

Thanks guys but gave up on the repair / fix-it option after trying all above suggestions and getting very confused in the aptitude text gui !
Tried to install synaptic but ran into similar errors and aborted.
I have now installed Rasbian Stretch and wifi setup went smoothly
Cheers for efforts

Return to “Troubleshooting”