New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Trying to overwrite '/usr/bin/scrollphathd_api', which is also in package python-scrollphathd 1.1.0 #100

Closed
teusink opened this Issue Jan 14, 2018 · 30 comments

Comments

Projects
None yet
@teusink

teusink commented Jan 14, 2018

I have an error on both a clean and freshly (but fully updated) installed Pi, and one with additional software.

Why I did try and didn't work:

  • remove package from /var/cache/apt/archives before doing upgrade.
  • sudo apt-get install --reinstall python3-scrollphathd

See below for the English error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  python3-scrollphathd
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 18.0 kB of archives.
After this operation, 14.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.raspberrypi.org/debian stretch/main armhf python3-scrollphathd all 1.1.0 [18.0 kB]
Fetched 18.0 kB in 0s (80.4 kB/s)         
Reading changelogs... Done
(Reading database ... 83564 files and directories currently installed.)
Preparing to unpack .../python3-scrollphathd_1.1.0_all.deb ...
Unpacking python3-scrollphathd (1.1.0) over (1.0.1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-scrollphathd_1.1.0_all.deb (--unpack):
 trying to overwrite '/usr/bin/scrollphathd_api', which is also in package python-scrollphathd 1.1.0
Errors were encountered while processing:
 /var/cache/apt/archives/python3-scrollphathd_1.1.0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

The bug is also mentioned here by someone else: https://bugs.launchpad.net/raspbian/+bug/1743199

@holta

This comment has been minimized.

holta commented Jan 14, 2018

Confirmed. This is serious as "apt upgrade" is failing for everyone running Raspbian (With Desktop and also Raspbian Lite?)

Many more bug reports here:
https://bugs.launchpad.net/raspbian/+bug/1743199

@Wikibear

This comment has been minimized.

Wikibear commented Jan 14, 2018

I can confirm this bug. I get this error also. I remove package and then upgrade was fine. This package will be installed automatically without my doing after this upgrade. Upgrade of a non installed package? Yes... I don't understand this why.

@FatalXCept10n

This comment has been minimized.

FatalXCept10n commented Jan 14, 2018

I got the error as well. This was on a fresh install of the latest Stretch from a noobs-lite. I ran:
sudo apt-get update
Which completed with no errors.
I then ran:
sudo apt-get upgrade
And got the error. I tried removing the archive from var/cache which was a deb file, and I deleted the python-3- scrollphathd-api file and still could not install scrollphathd. Hardware: RPi2B with GPS hat from adafruit and raspberry pi official 7” touchscreen. Reputable and reliable fast storage micro sd card.
I have not been able to reinstall the package and it has not tried to install it during subsequent apt-get upgrades.

@XECDesign

This comment has been minimized.

Contributor

XECDesign commented Jan 14, 2018

ping @Gadgetoid

@filthycoding

This comment has been minimized.

filthycoding commented Jan 14, 2018

Reproduction:

  • apt remove -y python-scrollphathd python3-scrollphathd
  • apt install -y python3-scrollphathd or apt install -y python-scrollphathd
  • apt install -y python-scrollphathd or apt install -y python3-scrollphathd, depending on which version you chose above

And out comes above error, but also with python-scrollphathd, not only with the Python 3 version of this package:

Selecting previously unselected package python-scrollphathd.
(Reading database ... 139887 files and directories currently installed.)
Preparing to unpack .../python-scrollphathd_1.1.0_all.deb ...
Unpacking python-scrollphathd (1.1.0) ...
dpkg: error processing archive /var/cache/apt/archives/python-scrollphathd_1.1.0_all.deb (--unpack):
 trying to overwrite '/usr/bin/scrollphathd_api', which is also in package python3-scrollphathd 1.1.0
Errors were encountered while processing:
 /var/cache/apt/archives/python-scrollphathd_1.1.0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
@Wikibear

This comment has been minimized.

Wikibear commented Jan 14, 2018

Try:
sudo apt remove -y python3-scrollphathd
sudo dpkg --configure -a
sudo apt install python3-scrollphathd -y

Do the trick for me.

@ilkevinli

This comment has been minimized.

ilkevinli commented Jan 14, 2018

Still didn't work for me:

pi@raspberrypi:~ $ sudo dpkg --configure -a
pi@raspberrypi:~ $ sudo apt install python3-scrollphathd -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
python3-psutil
The following NEW packages will be installed:
python3-scrollphathd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/18.0 kB of archives.
After this operation, 247 kB of additional disk space will be used.
(Reading database ... 166593 files and directories currently installed.)
Preparing to unpack .../python3-scrollphathd_1.1.0_all.deb ...
Unpacking python3-scrollphathd (1.1.0) ...
dpkg: error processing archive /var/cache/apt/archives/python3-scrollphathd_1.1.0_all.deb (--unpack):
trying to overwrite '/usr/bin/scrollphathd_api', which is also in package python-scrollphathd 1.1.0
Errors were encountered while processing:
/var/cache/apt/archives/python3-scrollphathd_1.1.0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $

@filthycoding

This comment has been minimized.

filthycoding commented Jan 14, 2018

@Wikibear Didn't help for me in any way, with none of the two packages.

@Aletron9000

This comment has been minimized.

Aletron9000 commented Jan 14, 2018

@Wikibear same, the method did not work for me.

@davidhowell-tx

This comment has been minimized.

davidhowell-tx commented Jan 14, 2018

I'm having the same issue. I tried removing both python and python3 versions of scrollphathd and installing python, then python3 version. Same error occurs:

  • sudo apt-get remove python3-scrollphathd
  • sudo apt-get remove python-scrollphathd
  • sudo rm /var/cache/apt/archives/python3-scrollphathd_1.1.0_all.deb
  • sudo rm /var/cache/apt/archives/python-scrollphathd_1.1.0_all.deb
  • sudo apt-get install python3-scrollphathd
  • sudo apt-get install python-scrollphathd
  • dpkg: error processing archive /var/cache/apt/archives/python-scrollphathd_1.1.0_all.deb (--unpack):
    trying to overwrite '/usr/bin/scrollphathd_api', which is also in package python3-scrollphathd 1.1.0
    Errors were encountered while processing:
    /var/cache/apt/archives/python-scrollphathd_1.1.0_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
@davidhowell-tx

This comment has been minimized.

davidhowell-tx commented Jan 14, 2018

I ran the following to force dpkg to overwrite the noted scrollphathd_api file, but unsure if this causes issues with either of the programs:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/python-scrollphathd_1.1.0_all.deb
(Reading database ... 123211 files and directories currently installed.)
Preparing to unpack .../python-scrollphathd_1.1.0_all.deb ...
Unpacking python-scrollphathd (1.1.0) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/bin/scrollphathd_api', which is also in package python3-scrollphathd 1.1.0
Setting up python-scrollphathd (1.1.0) ...

@reinvl

This comment has been minimized.

reinvl commented Jan 15, 2018

I am getting the same error. Looking for a solution.

@0n3-70uch

This comment has been minimized.

0n3-70uch commented Jan 15, 2018

Hello,
@Wikibear Didn't work for me too.

@0n3-70uch

This comment has been minimized.

0n3-70uch commented Jan 15, 2018

Workaround found here:
https://www.raspberrypi.org/forums/viewtopic.php?t=202523#p1259028

Just type the following:
cd /var/cache/apt/archives
sudo dpkg -i --force-overwrite python3-scrollphathd_1.1.0_all.deb

@teusink

This comment has been minimized.

teusink commented Jan 15, 2018

@0n3-70uch That is a workaround imo :). A solution is that the error won't come back after reinstalling the packages or when doing the update :).

@0n3-70uch

This comment has been minimized.

0n3-70uch commented Jan 15, 2018

Yeah you are right... :-)

@nathan-weinberg

This comment has been minimized.

nathan-weinberg commented Jan 15, 2018

@0n3-70uch Workaround fixed the issue for me as well - thanks!

@JorinL

This comment has been minimized.

JorinL commented Jan 15, 2018

@0n3-70uch yep that's it!

@XECDesign

This comment has been minimized.

Contributor

XECDesign commented Jan 16, 2018

A new version of the package has been uploaded today. Does it resolve the issue?

@filthycoding

This comment has been minimized.

filthycoding commented Jan 16, 2018

@XECDesign No, it doesn't. Both packages still conflict with each other in the exact same way.

@turboc1208

This comment has been minimized.

turboc1208 commented Jan 16, 2018

it looks like scrollphathd is for some type of external scrolling display. Since I don't have that device I just uninstalled the python3-scrollphathd and problem solved. I'm not sure why it was being installed in the first place.

@XECDesign

This comment has been minimized.

Contributor

XECDesign commented Jan 16, 2018

Thanks for checking. I've forwarded the issue on more directly.

@Gadgetoid

This comment has been minimized.

Gadgetoid commented Jan 16, 2018

@filthycoding @XECDesign I don't understand why python3-scrollphathd_1.1.1 and python-scrollphathd_1.1.1 have not fixed this issue. I removed the binary endpoint and republished as soon as I saw this on the forums today.

Installing these two packages locally and inspecting their contents with dpkg -L does not list the path /usr/bin/scrollphathd_api

You can obtain the 1.1.1 deb files here: https://github.com/pimoroni/scroll-phat-hd/releases/tag/v1.1.1

@filthycoding

This comment has been minimized.

filthycoding commented Jan 17, 2018

Okay, for some reason, the issue is fixed now, but wasn't before (even though both versions were updated to 1.1.1 and I tried installing one after another, just now it suddenly worked on its own).

@lukasl1991

This comment has been minimized.

lukasl1991 commented Jan 17, 2018

I had exactly the same problem. Do I understand correctly that I could now try it again without doing
cd /var/cache/apt/archives sudo dpkg -i --force-overwrite python3-scrollphathd_1.1.0_all.deb

@Gadgetoid

This comment has been minimized.

Gadgetoid commented Jan 17, 2018

@lukasl1991

Yes, version 1.1.1 should have made its way through the system now, try:

sudo apt update
sudo apt upgrade

It should pull the new 1.1.1 version instead of 1.1.0. Bearing in mind 1.1.0 might otherwise be lodged in your cache.

@lukasl1991

This comment has been minimized.

lukasl1991 commented Jan 17, 2018

@Gadgetoid

Yes, it works now! Thank you ;-)

@0n3-70uch

This comment has been minimized.

0n3-70uch commented Jan 17, 2018

@Gadgetoid Hi I received the same error like before. But this is running:

sudo apt update
sudo apt dist-upgrade

It's solved now... thanks.

@XECDesign

This comment has been minimized.

Contributor

XECDesign commented Jan 17, 2018

Thanks everyone

@XECDesign XECDesign closed this Jan 17, 2018

@RobertOnGit

This comment has been minimized.

RobertOnGit commented Jan 19, 2018

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment