The package ttf-mscorefonts-installer needs to be reinstalled, but I can't find an archive for it

Asked by Ranmuthu Bimali Buddhi

Here is my terminal output...

bimali@bimali-pc:~$ ubuntu-support-status
Traceback (most recent call last):
  File "/usr/bin/ubuntu-support-status", line 147, in <module>
    with apt.Cache() as cache:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 130, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 186, in open
    self._depcache = apt_pkg.DepCache(self._cache)
apt_pkg.Error: E:The package ttf-mscorefonts-installer needs to be reinstalled, but I can't find an archive for it.
bimali@bimali-pc:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
bimali@bimali-pc:~$ dpkg --print-foreign-architectures
i386
bimali@bimali-pc:~$ sudo grep -R roxy /etc/apt/*
[sudo] password for bimali:
bimali@bimali-pc:~$ grep roxy /etc/environment
http_proxy=http://cachex.pdn.ac.lk:3128
https_proxy=http://cachex.pdn.ac.lk:3128
all_proxy=http://cachex.pdn.ac.lk:3128
bimali@bimali-pc:~$ echo $http_proxy
http://cachex.pdn.ac.lk:3128
bimali@bimali-pc:~$ echo $ftp_proxy

bimali@bimali-pc:~$ grep roxy /etc/bash.bashrc
bimali@bimali-pc:~$ grep roxy ~/.bashrc
bimali@bimali-pc:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
bimali@bimali-pc:~$ sudo fuser -vvv /var/lib/dpkg/lock
bimali@bimali-pc:~$ sudo fuser -vvv /var/cache/apt/archives/lock
bimali@bimali-pc:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
bimali@bimali-pc:~$ uname -a
Linux bimali-pc 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
bimali@bimali-pc:~$
bimali@bimali-pc:~$ sudo rm /var/lib/apt/lists/lock
bimali@bimali-pc:~$ sudo rm /var/cache/apt/archives/lock
bimali@bimali-pc:~$ sudo rm /var/lib/dpkg/lock
bimali@bimali-pc:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
bimali@bimali-pc:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
bimali@bimali-pc:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
bimali@bimali-pc:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
bimali@bimali-pc:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
cp: cannot stat '/var/lib/dpkg/available-old': No such file or directory
bimali@bimali-pc:~$ sudo rm -rf /var/lib/dpkg/updates/*
bimali@bimali-pc:~$ sudo rm -rf /var/lib/apt/lists
bimali@bimali-pc:~$ sudo rm /var/cache/apt/*.bin
bimali@bimali-pc:~$ sudo mkdir /var/lib/apt/lists
bimali@bimali-pc:~$ sudo mkdir /var/lib/apt/lists/partial
bimali@bimali-pc:~$ LANG=C;sudo apt-get clean
bimali@bimali-pc:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
bimali@bimali-pc:~$ sudo dpkg --configure -a
Setting up mysql-server-5.7 (5.7.23-0ubuntu0.18.04.1) ...
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.23, use --force if you still need to run mysql_upgrade
Setting up libopencore-amrwb0:amd64 (0.1.3-2.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
bimali@bimali-pc:~$ sudo dpkg --clear-avail
bimali@bimali-pc:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package ttf-mscorefonts-installer needs to be reinstalled, but I can't find an archive for it.
bimali@bimali-pc:~$
bimali@bimali-pc:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package ttf-mscorefonts-installer needs to be reinstalled, but I can't find an archive for it.
bimali@bimali-pc:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package ttf-mscorefonts-installer needs to be reinstalled, but I can't find an archive for it.
bimali@bimali-pc:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Ign:1 cdrom://Ubuntu 17.10 _Artful Aardvark_ - Release amd64 (20180105.1) artful InRelease
Err:2 cdrom://Ubuntu 17.10 _Artful Aardvark_ - Release amd64 (20180105.1) artful Release
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err:3 http://lk.archive.ubuntu.com/ubuntu artful InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Err:4 http://archive.ubuntu.com/ubuntu bionic InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Err:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Err:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Err:7 http://archive.ubuntu.com/ubuntu bionic-security InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Reading package lists... Done
E: The repository 'cdrom://Ubuntu 17.10 _Artful Aardvark_ - Release amd64 (20180105.1) artful Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
bimali@bimali-pc:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
Ign:1 cdrom://Ubuntu 17.10 _Artful Aardvark_ - Release amd64 (20180105.1) artful InRelease
Err:2 cdrom://Ubuntu 17.10 _Artful Aardvark_ - Release amd64 (20180105.1) artful Release
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err:3 http://archive.ubuntu.com/ubuntu bionic InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Err:4 http://lk.archive.ubuntu.com/ubuntu artful InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Err:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Err:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Err:7 http://archive.ubuntu.com/ubuntu bionic-security InRelease
  Could not resolve 'cachex.pdn.ac.lk'
Reading package lists... Done
E: The repository 'cdrom://Ubuntu 17.10 _Artful Aardvark_ - Release amd64 (20180105.1) artful Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
bimali@bimali-pc:~$
bimali@bimali-pc:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list

     1 deb cdrom:[Ubuntu 17.10 _Artful Aardvark_ - Release amd64 (20180105.1)]/ artful main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://archive.ubuntu.com/ubuntu bionic main restricted
     6 deb-src http://lk.archive.ubuntu.com/ubuntu/ artful main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted
    11 # deb-src http://lk.archive.ubuntu.com/ubuntu/ artful-updates main restricted
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://archive.ubuntu.com/ubuntu bionic universe
    17 # deb-src http://lk.archive.ubuntu.com/ubuntu/ artful universe
    18 deb http://archive.ubuntu.com/ubuntu bionic-updates universe
    19 # deb-src http://lk.archive.ubuntu.com/ubuntu/ artful-updates universe
    20
    21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    22 ## team, and may not be under a free licence. Please satisfy yourself as to
    23 ## your rights to use the software. Also, please note that software in
    24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    25 ## security team.
    26 deb http://archive.ubuntu.com/ubuntu bionic multiverse
    27 # deb-src http://lk.archive.ubuntu.com/ubuntu/ artful multiverse
    28 deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
    29 # deb-src http://lk.archive.ubuntu.com/ubuntu/ artful-updates multiverse
    30
    31 ## N.B. software from this repository may not have been tested as
    32 ## extensively as that contained in the main release, although it includes
    33 ## newer versions of some applications which may provide useful features.
    34 ## Also, please note that software in backports WILL NOT receive any review
    35 ## or updates from the Ubuntu security team.
    36 deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
    37 # deb-src http://lk.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
    38
    39 ## Uncomment the following two lines to add software from Canonical's
    40 ## 'partner' repository.
    41 ## This software is not part of Ubuntu, but is offered by Canonical and the
    42 ## respective vendors as a service to Ubuntu users.
    43 # deb http://archive.canonical.com/ubuntu artful partner
    44 # deb-src http://archive.canonical.com/ubuntu artful partner
    45
    46 deb http://archive.ubuntu.com/ubuntu bionic-security main restricted
    47 # deb-src http://security.ubuntu.com/ubuntu artful-security main restricted
    48 deb http://archive.ubuntu.com/ubuntu bionic-security universe
    49 # deb-src http://security.ubuntu.com/ubuntu artful-security universe
    50 deb http://archive.ubuntu.com/ubuntu bionic-security multiverse
    51 # deb-src http://security.ubuntu.com/ubuntu artful-security multiverse

/etc/apt/sources.list.d/danielrichter2007-ubuntu-grub-customizer-artful.list

     1 # deb http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic main # disabled on upgrade to bionic
     2 # deb-src http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu artful main
bimali@bimali-pc:~$ sudo dpkg --audit
The following packages are in a mess due to serious problems during
installation. They must be reinstalled for them (and any packages
that depend on them) to function properly:
 ttf-mscorefonts-installer (no description available)

The following packages are missing the list control file in the
database, they need to be reinstalled:
 ttf-mscorefonts-installer (no description available)

The following packages are missing the md5sums control file in the
database, they need to be reinstalled:
 ttf-mscorefonts-installer (no description available)

bimali@bimali-pc:~$

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Ranmuthu Bimali Buddhi
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

The output shows some configuration errors.

1. "Err:3 http://archive.ubuntu.com/ubuntu ... Could not resolve 'cachex.pdn.ac.lk'"
There seems to be a proxy server defined (in the /etc/environment configuration file) which is unreachable.
Proposed solution: You have to make sure that you have everything in place to use that proxy server, or you must remove the proxy server definition from your system.

2. "E: The repository 'cdrom://Ubuntu 17.10 ..."
You still have the installation DVD defined as a repository source. Due to the fact that this DVD is not inserted any more, you get error messages.
Proposed solution: Unselect the DVD as a repository source, either by manually editing the /etc/apt/sources.list file or by unticking the entry in the program software-properties-gtk

3. "Err:4 http://lk.archive.ubuntu.com/ubuntu artful InRelease"
There are outdated references to a previous Ubuntu release.
Proposed solution: Manually edit the /etc/apt/sources.list file and replace all occurrences of "artful" by "bionic" except those in the first line (which starts with "deb cdrom").

4. "E: The package ttf-mscorefonts-installer needs to be reinstalled..."
What output do you receive for the command
dpkg -l | grep mscorefonts

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Do you use a proxy for Web access?

Revision history for this message
Ranmuthu Bimali Buddhi (bimali) said :
#3

This is the output for "dpkg -l | grep mscorefonts"

bimali@bimali-pc:~$ dpkg -l | grep mscorefonts
iHR ttf-mscorefonts-installer 3.6ubuntu2 all (no description available)
bimali@bimali-pc:~$

@Manfred Hampl

Revision history for this message
Ranmuthu Bimali Buddhi (bimali) said :
#4

yes.
there was a manually set.
but now I edit it..
I don't remember now..
Sorry for it.

@actionparsnip

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

After correcting the proxy problem try the command

sudo apt install --reinstall ttf-mscorefonts-installer

and report the results.

I case that you get a request about accepting the license you have to use the tab and space keys to mark the <OK> "button" on the screen.

Revision history for this message
Ranmuthu Bimali Buddhi (bimali) said :
#6

Can you help me to solve the proxy problem.
I edited the environment file.
there were some lines regarding proxy.
After deleting all I paste these lines.

http_proxy="http://<username>:<password>@<hostname>:<port>/"
https_proxy="http://<username>:<password>@<hostname>:<port>/"
ftp_proxy="http://<username>:<password>@<hostname>:<port>/"
no_proxy="<pattern>,<pattern>,...

is this correct..?

Revision history for this message
Ranmuthu Bimali Buddhi (bimali) said :
#7

Thank you for helping me.
Now I solved it.
I missed the some line.
Anyway thanks a lot...