1

I have seen some odd error messages about missing files after running

sudo apt-get update && sudo apt-get install -y flashplugin-installer

Specifically that some config file in /boot/ was missing. This worries me:

Setting up nvidia-304 (304.125-0ubuntu0.0.1) ...
dpkg: warning: version '*-*' has bad syntax: version number does not start with a digit
update-initramfs: deferring update (trigger activated)
Traceback (most recent call last):
  File "/usr/bin/quirks-handler", line 26, in <module>
    import Quirks.quirkapplier
  File "/usr/lib/python2.7/dist-packages/Quirks/quirkapplier.py", line 26, in <module>
    import XKit.xutils
ImportError: No module named XKit.xutils
dpkg: error processing package nvidia-304 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up flashplugin-installer (11.2.202.457ubuntu0.14.04.1) ...
Processing triggers for initramfs-tools (0.99ubuntu13.5) ...
update-initramfs: Generating /boot/initrd.img-3.2.0-74-generic
grep: /boot/config-3.2.0-74-generic: No such file or directory
Errors were encountered while processing:
 nvidia-304
E: Sub-process /usr/bin/dpkg returned an error code (1)

What should I do?

EDIT 1: This may or may not be related to my new issue of unity failing and TTY1 claiming it is not installed.

EDIT 2: Unity seems to have taken a holiday so I have only Firefox (because that was open when it all fell apart and alt+ctrl+F1 into a hard shell. I'd rather not reboot until I know that I can get the whole thing going again and also because I shouldn't have to IMHO. It has been suggested that I get rid of old linux-image and linux-header but the only way I knew of doing that was an epic copy and paste and way beyond anything I can remember to type out again in tty1.

EDIT 3: According to uname -a my kernel version is 3.2.0-74-generic which may or may not be the right thing for it to be (I haven't a clue in that regard). However the lack of config file suggests something is wrong.

EDIT 4: Following https://help.ubuntu.com/community/Lubuntu/Documentation/RemoveOldKernels I discovered that there were a whole load of 2.6 images although the apt-get remove for them seems to largely be reporting the same lack of file. As per comments the upgrade might not have gone as smoothly as Ubuntu had led me to understand. So I might need to also find a way to fix this too.

EDIT 5: I tried do-release-upgrade -d which started well but ended in error messages. The error message pointed me towards this report: https://bugs.launchpad.net/bugs/1363703 which did not tell me much.

I dropped to tty2 which welcomed me to 12.04.5. I did lsb_release -cd which said I was on 14.10 / utopic although the shell told me that new release 14.04.1 was available and that I should use do-release-upgrade to get it but when run it says there is nothing to upgrade to. I am officially out of ideas, clues and any semblance of a plan.

EDIT 6: Apprently I have attempted to upgrade to 14.10 which was clumsy of me. The problem I encountered that almost killed everything was a dead config file: What is virtuoso-nepomuk and how much harm could I do by uninstalling it? Now I have the oringinal problem (see way up there somewhere and segment fault when starting unity). The seg fault is probably a different question.

Edit 7: The NVidia problem might be well known: Can't update Nvidia driver and having error near the end of the installation I am looking into this now.

EDIT 8: After managing to get most of the upgrades to go through the list of "problem packages" is a touch bigger.

1 Answers1

0

This is based on the log I kept of what I did so there are some wrong terns and wild guesses. However I think I solved it but not without the help of comments to the question and a lot of other questions and their answers.

As per the many updates to the question I was getting there slowly even though I had accidentally moved on from 14.04 LTS to 14.10 by foolish error. I had a broken UI (no unity and patchy compiz) which gave me a UI that was just FireFox and TTY1 (also 2 and 3 for top and keeping compiz running). Then I misunderstood an article I was reading and triggered a reboot. Now my broken UI was gone and I was in Root shell only.

This is how I fixed that.

Most of this was inspired by https://askubuntu.com/a/510830/145472 and would normally need a sudo before each command

So there I am in root. I mounted everything as read/write and started to get seriouse. I was using my ancient pile of poo Windows Laptop to access the web.

I tried dhclient eth0 a few times which would throw up errors but was not without success it seems. I did not note all the errors or exactly when they started to change.

I moved to /var/cache/apt/archives/ which would otherwise prefix before the *. The idea of the above answer was to basically push things along until they became unstuck.

dpkg -i *.deb
apt-get install -f

result: old problems gone but new problems added

dpkg --configure -a

result: problem list changed some more

dpkg -i *.deb

This was able to get further than last time so...

dpkg --configure -a

Which still reported a fair few dependency errors. This list of problem packages was bigger than ever. Off the screen big.

apt-get install -f

This was able to now use apt-get to get new packages so whatever else I had done I had some networking back so it was working. (As I mentioned)

Result: The list of problem packages was now much smaller. NVidia was no longer on the list of problem packages. So I tried:

dpkg --configure -a

Which got a little bt done. So I giggled it a bit further along with

apt-get update
apt-get upgrade

Then as per the answer in the link back to:

dpkg -i *.deb
dpkg --configure -a

At this point there didn't seem to be much more progress to be made so I rebooted... sort of. After nine hours (I went to bed) I gave up and pressed the reset button.

Result: GUI now loads but "Failed to Create Session" when I try and log in. Progress but no enough.

So I dropped to TTY1 and logged in that way.

Saw a few systemd-logind failed to start unit messages which seems to be a known bug: https://bugs.launchpad.net/ubuntu/+source/systemd-shim/+bug/1359439

sudo apt-get update && sudo apt-get upgrade

Did not manage much.

So I ran sudo apt-get autoremove as it suggested. This resulted in the removal of old packaes and the processing of triggers for things.

It was then that I realised that apt was not getting a connection and successfully ran sudo dhclient eth0 which meant that the problems that I had first seen were fixed so I was doing something right.

sudo apt-get update && sudo apt-get upgrade

2 new packages in archives.

sudo apt-get install --reinstall liblapack3

(that was the topmost package reporting an error)

However this gave me an error message.

E: Internal Error, No file name for liblapack3:amd64

I have no idea what that means but I knew enough to know that something needed a good hard push.

sudo dpkg --force-depends -r liblapack3:amd64

This resulted in the most sublimely cynical and sarcastic messages I have ever seen as if my own PC was saying "WTF, you idiot. I hope you know what you doing". It was the funniest thing I have seen in a while (for me anyway).

I had hopped that sudo apt-get install --reinstall liblapack3 would clear the problem but, no. Nothing much was changed.

Noticing that most of the problems were waiting on python-numpy I tried

sudo dpkg --force-depends -r python-numpy
sudo apt-get install -f

This did not help

However dpkg -i *.deb gave some very telling error messages including some package conflicts that scrolled rapidly by.

sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade

(suggested by another) seemed to fix stuff but not so much... However it was probably helpful, maybe, perhaps. Actually I have no idea if I was just doing nothing with style...

dpkg -i *.deb
dpkg --configure -a

Made the error list... different. Some new in, some old out.

sudo apt-get -o Debug::pkgProblemResolver=yes install python-numpy

Not sure that helped

Then I started to wonder about errors I was missing. I remember that there was a way to get your output redirected into a file and not remembering how I had to use a search engine again and found this: http://www.linuxquestions.org/questions/linux-software-2/bash-how-to-redirect-output-to-file-and-still-have-it-on-screen-412611/ This led me to see error messages that I was missing. PRobably ones I could have done with seeing before I made everything much worse by my clumsy actions.

update-alternatives: error: alternative liblapack.so.3gf can't be a slave of liblapack.so.3: it is a master alternative

This is, apparently, known bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660607

Googling I found this blog post: https://aweirdimagination.net/2015/03/27/fixing-broken-alternatives/ It recommended:

sudo update-alternatives --remove-all liblapack.so.3gf
sudo apt-get install -f

problems solved.

dpkg -i *.deb
dpkg --configure -a
sudo apt-get update && sudo apt-get upgrade

to double check. All happy. No errors.

sudo reboot

This time rebooting worked and all the errors I was seeing are gone away. There was probably a far less painful way for me to have done this.