When I tried to update an Ubuntu (12.04) machine with the usual apt-get command, this error message came up:
Do you want to continue [Y/n]? Y E: Internal Error, No file name for libapt-pkg4.12
Reading this post (http://ubuntuforums.org/showthread.php?t=2045321), one way to fix it is to download liapt-pkg4.12 and re-install it:
# apt-get download libapt-pkg4.12/precise-security # dpkg -i libapt-pkg4.12_0.8.16~exp12ubuntu10.10_amd64.deb
This seems did the trick.