plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Can't install any package

Thu Sep 19, 2013 2:56 pm

Try

apt-get install --reinstall python2.7-minimal

leo
Posts: 6
Joined: Wed Sep 18, 2013 3:48 pm

Re: Can't install any package

Mon Sep 23, 2013 3:37 pm

Isn't there a way to remove Python with force and reinstall it completely? Possibly my SD-Card is damaged, but before setting everything up newly I would like to give it one more try.

leo
Posts: 6
Joined: Wed Sep 18, 2013 3:48 pm

Re: Can't install any package

Mon Sep 23, 2013 3:49 pm

Hi, forget my last post, here are the results (for a reason I don't know I never got your last reply)

root@raspberrypi:/# apt-get install --reinstall python2.7-minimal
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libblas3gf liblapack3gf
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
python-numpy python-rpi.gpio
Suggested packages:
python-numpy-doc python-numpy-dbg python-nose python-dev gfortran
The following packages will be upgraded:
python-numpy python-rpi.gpio
2 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
194 not fully installed or removed.
Need to get 1,664 kB/4,158 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://mirrordirector.raspbian.org/raspbian/ wheezy/main python2.7-minimal armhf 2.7.3-6 [1,664 kB]
Fetched 1,664 kB in 9s (183 kB/s)
(Reading database ... 61956 files and directories currently installed.)
Preparing to replace python-numpy 1:1.6.2-1 (using .../python-numpy_1%3a1.6.2-1.2_armhf.deb) ...
Segmentation fault
dpkg: warning: subprocess old pre-removal script returned error exit status 139
dpkg: trying script from the new package instead ...
Segmentation fault
dpkg: error processing /var/cache/apt/archives/python-numpy_1%3a1.6.2-1.2_armhf.deb (--unpack):
subprocess new pre-removal script returned error exit status 139
Segmentation fault
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 139
Preparing to replace python-rpi.gpio 0.4.1a-1 (using .../python-rpi.gpio_0.5.3a-1_armhf.deb) ...
Segmentation fault
dpkg: warning: subprocess old pre-removal script returned error exit status 139
dpkg: trying script from the new package instead ...
Segmentation fault
dpkg: error processing /var/cache/apt/archives/python-rpi.gpio_0.5.3a-1_armhf.deb (--unpack):
subprocess new pre-removal script returned error exit status 139
Segmentation fault
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 139
Preparing to replace python2.7-minimal 2.7.3-6 (using .../python2.7-minimal_2.7.3-6_armhf.deb) ...
Unpacking replacement python2.7-minimal ...
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/python-numpy_1%3a1.6.2-1.2_armhf.deb
/var/cache/apt/archives/python-rpi.gpio_0.5.3a-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@raspberrypi:/#

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Can't install any package

Mon Sep 23, 2013 4:25 pm

Ok it seems it successfully reinstalled python2.7-minimal, now try apt-get -f install

leo
Posts: 6
Joined: Wed Sep 18, 2013 3:48 pm

Re: Can't install any package

Mon Sep 23, 2013 5:03 pm

Hi,
the apt-get -f succeeded, all looks good now. Seems like this solved the problem.
The first thing I'll do now is make a backup of the SD-Card
Thanks a lot for your help!
Regards, Leo

Mr.Mancardo
Posts: 4
Joined: Sat May 17, 2014 12:30 pm

Re: Can't install any package

Tue May 20, 2014 1:33 am

hello: can you help me
i have the 1.3.7. verson of NOOBS and weezy. when ever i try to do sudo apt-get update or upgrade {anything sudo} it goes dpkg as been interupted. for and example.
Hit http://raspberrypi.collabora.com wheezy Release.gpg
Hit http://repository.wolfram.com stable Release.gpg
Hit http://repository.wolfram.com stable Release
Hit http://mirrordirector.raspbian.org wheezy Release.gpg
Hit http://raspberrypi.collabora.com wheezy Release
Hit http://archive.raspberrypi.org wheezy Release.gpg
Hit http://archive.raspberrypi.org wheezy Release
Hit http://mirrordirector.raspbian.org wheezy Release
Hit http://repository.wolfram.com stable/non-free armhf Packages
Hit http://raspberrypi.collabora.com wheezy/rpi armhf Packages
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Ign http://repository.wolfram.com stable/non-free Translation-en
Hit http://mirrordirector.raspbian.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
or
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
and my pi store will not open!
can you help me

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Can't install any package

Tue May 20, 2014 9:00 am

So what happens if you do what it asks and run "sudo dpkg --configure -a"

Mr.Mancardo
Posts: 4
Joined: Sat May 17, 2014 12:30 pm

Re: Can't install any package

Tue May 20, 2014 12:11 pm

pi@raspberrypi ~ $ sudo dpkg --configure -a
Processing triggers for menu ...
Setting up ssh (1:6.0p1-4+deb7u1) ...
Setting up rpi-update (20140321) ...
Setting up openssl (1.0.1e-2+rvt+deb7u7) ...
Setting up python3-pifacedigital-scratch-handler (2.0.5-1) ...
Setting up libxfont1 (1:1.4.5-4) ...
Setting up omxplayer (0.3.5~git20140322~39e6342) ...
Setting up python3-rpi.gpio (0.5.5-1) ...
Setting up python2.7 (2.7.3-6+deb7u2) ...
Setting up udisks (1.0.4-7wheezy1) ...
Setting up python-rpi.gpio (0.5.5-1) ...
Setting up libpython2.7 (2.7.3-6+deb7u2) ...
Setting up idle-python2.7 (2.7.3-6+deb7u2) ...
Setting up perl-modules (5.14.2-21+rpi2+deb7u1) ...
Setting up perl (5.14.2-21+rpi2+deb7u1) ...
Setting up libdpkg-perl (1.16.14+rpi1) ...
Setting up dpkg-dev (1.16.14+rpi1) ...
Processing triggers for menu ...

Mr.Mancardo
Posts: 4
Joined: Sat May 17, 2014 12:30 pm

Re: Can't install any package

Tue May 20, 2014 12:14 pm

I think that fixed the 'sudo' for my raspberry pi, but will that fix my pi store

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Can't install any package

Tue May 20, 2014 1:44 pm

I would suggest trying it and if it doesn't work posting in the pistore forum.

msgowdara
Posts: 1
Joined: Sun Jun 03, 2018 5:18 pm

Re: Can't install any package

Sun Jun 03, 2018 5:39 pm

I have recently upgraded the distro to stretch from jessie. I am using raspberry pi 3b.
I had power breakdown during upgrade, however, continued the installation by giving the command shown in terminal.

Now I am not able to install any package as I am getting following error, when I install any package. (I was asked to install firmware-brcm80211 to start using wifi).

I am getting following error while installing packages.

Code: Select all

pi@raspberrypi:~ $ sudo apt-get install firmware-brcm80211 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package supercollider-common needs to be reinstalled, but I can't find an archive for it.
Further, my wifi is not starting by default as it shows error when I put cursor on network icon on top right of the window " Connection to dhcpcd lost.

when I tried to look for status of dhcpcd service I get following error.

Code: Select all

pi@raspberrypi:~ $ sudo systemctl start dhcpcd.service
Job for dhcpcd.service failed because the control process exited with error code.
See "systemctl status dhcpcd.service" and "journalctl -xe" for details.
Result of systemctl status dhcpcd.service

Code: Select all

pi@raspberrypi:~ $ systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-06-03 23:00:57 IST; 4min 27s ago
  Process: 4459 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=6)

Jun 03 23:00:57 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: Not running dhcpcd because /etc/network/interfaces
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: defines some interfaces that will use a
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: DHCP client or static address
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
Jun 03 23:00:57 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.

Interested part journalctl -xe is as below:

Code: Select all

Jun 03 23:00:57 raspberrypi dhcpcd[4459]: Not running dhcpcd because /etc/network/interfaces
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: defines some interfaces that will use a
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: DHCP client or static address
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
Jun 03 23:00:57 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
-- Subject: Unit dhcpcd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit dhcpcd.service has failed.
-- 
-- The result is failed.
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
Jun 03 23:00:57 raspberrypi sudo[4450]: pam_unix(sudo:session): session closed for user root
Jun 03 23:01:19 raspberrypi kernel: w1_master_driver w1_bus_master1: Family 0 for 00.d40000000000.36 is not registered.
Jun 03 23:02:31 raspberrypi kernel: w1_master_driver w1_bus_master1: Family 0 for 00.340000000000.df is not registered.
Kindly help.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6229
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Can't install any package

Mon Jun 04, 2018 7:28 am

msgowdara wrote:
Sun Jun 03, 2018 5:39 pm
I have recently upgraded the distro to stretch from jessie. I am using raspberry pi 3b.
I had power breakdown during upgrade, however, continued the installation by giving the command shown in terminal.

Now I am not able to install any package as I am getting following error, when I install any package. (I was asked to install firmware-brcm80211 to start using wifi).

I am getting following error while installing packages.

Code: Select all

pi@raspberrypi:~ $ sudo apt-get install firmware-brcm80211 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package supercollider-common needs to be reinstalled, but I can't find an archive for it.
Further, my wifi is not starting by default as it shows error when I put cursor on network icon on top right of the window " Connection to dhcpcd lost.

when I tried to look for status of dhcpcd service I get following error.

Code: Select all

pi@raspberrypi:~ $ sudo systemctl start dhcpcd.service
Job for dhcpcd.service failed because the control process exited with error code.
See "systemctl status dhcpcd.service" and "journalctl -xe" for details.
Result of systemctl status dhcpcd.service

Code: Select all

pi@raspberrypi:~ $ systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-06-03 23:00:57 IST; 4min 27s ago
  Process: 4459 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=6)

Jun 03 23:00:57 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: Not running dhcpcd because /etc/network/interfaces
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: defines some interfaces that will use a
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: DHCP client or static address
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
Jun 03 23:00:57 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.

Interested part journalctl -xe is as below:

Code: Select all

Jun 03 23:00:57 raspberrypi dhcpcd[4459]: Not running dhcpcd because /etc/network/interfaces
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: defines some interfaces that will use a
Jun 03 23:00:57 raspberrypi dhcpcd[4459]: DHCP client or static address
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
Jun 03 23:00:57 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
-- Subject: Unit dhcpcd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit dhcpcd.service has failed.
-- 
-- The result is failed.
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
Jun 03 23:00:57 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
Jun 03 23:00:57 raspberrypi sudo[4450]: pam_unix(sudo:session): session closed for user root
Jun 03 23:01:19 raspberrypi kernel: w1_master_driver w1_bus_master1: Family 0 for 00.d40000000000.36 is not registered.
Jun 03 23:02:31 raspberrypi kernel: w1_master_driver w1_bus_master1: Family 0 for 00.340000000000.df is not registered.
Kindly help.
In the future, please create a separate topic, since it's not related to this one.

Looks like there are 3 issues here:
1) Something isn't right with your apt sources.
2) Your /etc/network/interfaces has been modified (as the message you posted says). That's fine, if you don't want to use the default network setup, including the GUI applet.
3) Something to do with 1-wire, but I'm not sure what that's about. Are you trying to use 1-wire for anything?

What is the output of 'sudo apt update && apt-cache policy; cat /etc/network/interfaces'?

Return to “Raspberry Pi OS”