I get this error constantly trying to update or install anything;
E: Internal Error, No file name for libgcc1
Can anyone assist I've run out of options last chance before I just wipe this thing out and start over?
I saw this on a system being upgraded from 12.04LTS to 14.04LTS. I was able to 'rescue' the system with a combination of the steps below:
You may only need to issue this command to fix it:
# dpkg --configure -a
('#' means from a root prompt, which you get with 'sudo su')
See How to fix E: Internal Error, No file name for libc6
But it may be a little more involved than that.
This sequence should help towards reviving the system:
# apt-get clean
# apt-get install -fy
(ignore the error at the end)
# dpkg -i /var/cache/apt/archives/*.deb
# dpkg --configure -a
# apt-get install -fy
If the 'dpkg -i' command returns with errors, do the 'dpkg --configure -a', but then go back and repeat the 'dpkg -i', but with the 'E' option to speed it up a little:
# dpkg -Ei /var/cache/apt/archives/*.deb
Eventually, 'apt-get install -fy' should be able to run again, possibly even finish without errors, after which your system should be ok again. Do that cycle 'dpkg -i', 'dpkg --configure', 'apt-get install' a couple of times as long at it keeps making some progress.
If the above doesn't work, then this may work:
# dpkg -i /var/cache/apt/archives/*BLA*.deb
for 'BLA', replace with the last word of the error message 'E: Internal Error, No file name for BLA'.
If that command says something like 'cannot be configured because WOOPS:MEH is at a different version', then
# dpkg --purge --force-all WOOPS:MEH
And repeat the 'dpkg -i' command.
After this, go back to the sequence with 'apt-get install -fy' above. You may have to come back to this section for another 'BLA' package, and repeat...
After all this, I would suggest to do an 'apt-get dist-upgrade' again, and/or 'apt-get install ubuntu-desktop', etc to make sure all the needed packages are there.
You may actually finally need to iterate between 'apt-get install -fy' and 'apt-get dist-upgrade' a couple of times before you get a fully working setup again (stop if both commands finish without errors).
You can try sudo apt-get install -f
sudo apt-get check
?