Skip to content
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

@teusink
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link
Member

ping @Gadgetoid

@kescherCode
Copy link

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
Copy link

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

Do the trick for me.

@ilkevinli
Copy link

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:~ $

@kescherCode
Copy link

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

@Aletron9000
Copy link

Aletron9000 commented Jan 14, 2018

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

@davidhowell-tx
Copy link

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
Copy link

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) ...

@modrewrite
Copy link

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

@0n3-70uch
Copy link

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

@0n3-70uch
Copy link

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
Copy link
Author

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
Copy link

Yeah you are right... :-)

@nathan-weinberg
Copy link

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

@JorinL
Copy link

JorinL commented Jan 15, 2018

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

@XECDesign
Copy link
Member

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

@kescherCode
Copy link

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

@turboc1208
Copy link

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
Copy link
Member

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

@Gadgetoid
Copy link

@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

@kescherCode
Copy link

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
Copy link

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
Copy link

@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
Copy link

@Gadgetoid

Yes, it works now! Thank you ;-)

@0n3-70uch
Copy link

@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
Copy link
Member

Thanks everyone

@RobertOnGit
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests