NotBlaine
Posts: 3
Joined: Mon Nov 25, 2013 7:26 pm

Apt-Get Won't Get.

Mon Nov 25, 2013 7:43 pm

Ok. So during an install of Emacs, everything fell apart.

I've searched online about how to fix a broken Apt-Get install. I've tried -f, I've tried Aptitude, I've tried Auto Clean, Auto Remove. I even tried editing the installation scripts.

Here is a raw dump outlining the problem:

Code: Select all

pi@raspberrypi ~ $ sudo apt-get -f install                                                                                   Reading package lists... Done                                                                                                Building dependency tree                                                                                                     Reading state information... Done                                                                                            Correcting dependencies... failed.                                                                                           The following packages have unmet dependencies:                                                                              E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.                                 E: Unable to correct dependencies                                                                                            pi@raspberrypi ~ $ sudo apt-get install emacsReading package lists... Done                                                                                                Building dependency tree                                                                                                     Reading state information... Done                                                                                            emacs is already the newest version.                                                                                         You might want to run 'apt-get -f install' to correct these:                                                                 The following packages have unmet dependencies:                                                                               emacs23-bin-common : Depends: emacs23-common (= 23.4+1-4) but it is not going to be installed                               E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).                                    pi@raspberrypi ~ $ sudo apt-get install emacs23-common                                                                       Reading package lists... Done                                                                                                Building dependency tree                                                                                                     Reading state information... Done                                                                                            Suggested packages:                                                                                                            emacs23-el emacs23-common-non-dfsg                                                                                         The following packages will be upgraded:                                                                                       emacs23-common                                                                                                             1 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.                                                              4 not fully installed or removed.                                                                                            Need to get 0 B/18.6 MB of archives.                                                                                         After this operation, 59.6 MB of additional disk space will be used.                                                         (Reading database ... 75187 files and directories currently installed.)                                                      Preparing to replace emacs23-common 23.4+1-4 (using .../emacs23-common_23.4+1-4_all.deb) ...                                 Unpacking replacement emacs23-common ...                                                                                     dpkg: error processing /var/cache/apt/archives/emacs23-common_23.4+1-4_all.deb (--unpack):                                    unable to create `/usr/share/emacs/23.4/etc/images/smilies/grayscale/README.dpkg-new' (while processing `./usr/share/emacs/23.4/etc/images/smilies/grayscale/README'): Input/output error                                                                dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)                                                         Processing triggers for install-info ...                                                                                     Processing triggers for desktop-file-utils ...                                                                               Processing triggers for hicolor-icon-theme ...                                                                               Errors were encountered while processing:                                                                                     /var/cache/apt/archives/emacs23-common_23.4+1-4_all.deb                                                                     E: Sub-process /usr/bin/dpkg returned an error code (1)                                                                      pi@raspberrypi ~ $
emacs23-common is doing something, or not actually doing something.

I looked under var/lib/dpkg/info and I'll be damned if I can find emacs23-common to try and comment out the images (I assume it'll work by doing that).

Code: Select all

emacs23-bin-common.list      emacs23.list      emacs23.prerm             emacsen-common.postinst  emacs.listemacs23-bin-common.md5sums   emacs23.md5sums   emacsen-common.conffiles  emacsen-common.postrm    emacs.md5sumsemacs23-bin-common.postinst  emacs23.postinst  emacsen-common.list       emacsen-common.preinstemacs23-bin-common.prerm     emacs23.postrm    emacsen-common.md5sums    emacsen-common.prerm
I'd be fine with just completely nuking and reinstalling apt-get and never speaking of emacs again.

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

Re: Apt-Get Won't Get.

Tue Nov 26, 2013 10:49 am

Given the error you are getting the next thing I would try is forcing a filesystem check by doing.

sudo touch /forcefsck
sudo reboot

NotBlaine
Posts: 3
Joined: Mon Nov 25, 2013 7:26 pm

Re: Apt-Get Won't Get.

Tue Nov 26, 2013 7:09 pm

Plugwash:

It did not work. However that doesn't mean it's not the solution...

The plot thickens. And perhaps worsens.

I just noticed that none of the changes I was making would remain after a refresh.
To anything, really. I edited an existing script to make sure. I sudo'd in. Added a

Code: Select all

print("Hit CNTRL+C To Quit")
, saved.

Ran the script, everything worked. I restarted, opened the script file again, and that whole line was gone. According to ls the last file was updated Friday.

I backed up the files that I'd get angry if I lost and halted the system.

Not that I think that will help, or running it will hurt. I just don't want the temptation to poke it with sharp sticks until I get home and have some undivided attention.

Return to “Raspberry Pi OS”