Das Paket 'ttf-mscorefonts-installer' hat keinen Installationskandidaten


7

Ich habe eine Java-basierte Webanwendung, die auf dem Amazon EC2 Ubuntu-Server ausgeführt wird. Ich verwende Jasper-Berichte, um einige Berichte im PDF-Format zu generieren. Ich habe diese Berichte mit 'Jaspersoft Studio' erstellt.

Wenn ich jetzt versuche, Berichte zu erstellen, wird dieser Fehler angezeigt

net.sf.jasperreports.engine.util.jrfontnotfoundexception font 'Times New Roman' is not available to the jvm

Also habe ich beschlossen, die Microsoft-Schriftarten zu installieren. Ich tippte,

sudo apt-get install ttf-mscorefonts-installer

Es hat überhaupt nicht funktioniert. Stattdessen gab es mir den folgenden Hinweis

$ sudo apt-get install ttf-mscorefonts-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ttf-mscorefonts-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'ttf-mscorefonts-installer' has no installation candidate

Wie kann ich dieses Problem lösen?

Aktualisieren

Mein source.listenthält unten. bin ich sicher zu bearbeiten?

       ## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
#

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty main
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty main

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates main
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates main

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse
# deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse
# deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
# deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
# deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

deb http://security.ubuntu.com/ubuntu trusty-security main

1
Nach der Installation der Schriftart mit der @ mchid-Methode ist das Problem mit der Jasper-Schriftart behoben? oder müssen wir noch etwas tun?
— Arvindwill

Antworten:


11

Hier sind zwei Methoden, mit denen Sie die Software installieren können.

Befehlszeileninstallation

echo "deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/multiverse.list 
sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer

Einfach zu installieren

Öffnen Sie das Ubuntu Software Center, klicken Sie auf Bearbeiten und wählen Sie im Dropdown-Menü die Option Softwarequellen .

Aktivieren Sie das Kontrollkästchen für Software, die durch urheberrechtliche oder rechtliche Aspekte (Multiversum) eingeschränkt ist .

Möglicherweise werden Sie nach einem Passwort gefragt.

Wenn Sie fertig sind, führen Sie die folgenden Befehle aus:

sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer

Möglicherweise müssen Sie Ihre Befehle erneut überprüfen. Ich kann ein nicht geschlossenes Anführungszeichen sehen. Und ich habe keine GUI.
— Zitronensaft

1
@MIT_Love Danke, es ist in Zeile 3 geschlossen, aber Sie müssen nach rechts scrollen, um es zu sehen. Ich habe die Befehle tatsächlich kopiert und eingefügt, um zu testen, ob dies korrekt funktionieren würde.
— Mchid

OH OK. Die Kommandozeilenversion scheint auf EC2 spezialisiert zu sein, das ist besser. Lassen Sie mich es versuchen.
— Zitronensaft

@MIT_Love Alternativ können Sie gemäß den obigen Anweisungen von AB die Datei /etc/apt/sources.list bearbeiten, indem Sie das Kommentarzeichen (#) am Anfang der Zeilen 33, 35 und 45
— entfernen

3

Sie haben ein Tag 12.04, aber Ihre Quellenliste ist für 14.04?

Das Paket befindet sich in den multiverseRepositorys.

Bearbeiten Sie Ihre sources.list

sudo nano /etc/apt/sources.list

Entfernen Sie nach dem Update in Ihrer Frage einfach #das vordere in jeder Zeile, beginnend mit debund mit dem Eintragmultiverse

Hier ist die vollständige Liste basierend auf Ihrer listDatei zum Kopieren und Einfügen

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
#

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty main
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty main

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates main
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates main

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

deb http://security.ubuntu.com/ubuntu trusty-security main

Mach dasselbe in /etc/cloud/templates/sources.list.tmpl

Nachdem

sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer

Besondere Hinweise für Amazon EC2 Ubuntu Server

  1. Bearbeiten Sie Ihre /etc/cloud/cloud.cfg

    nano /etc/cloud/cloud.cfg

    und hinzufügen

    apt_preserve_sources_list: true
  2. Fügen Sie zusätzlich PPAs oder Nicht-Ubuntu-Quellen in separaten listDateien im Ordner hinzu

    /etc/apt/sources.list.d
  3. Nehmen Sie Ihre Änderungen in /etc/apt/sources.listvor

    /etc/cloud/templates/sources.list.tmpl

    auch, um ein erneutes Bündel zu überleben.


Ich kann diese Gui-Dinge nicht machen. Wie bereits erwähnt bin ich in Ubuntu Amazon Instanz. Was auch immer ich tue, muss über die Kommandozeile erledigt werden.
— Zitronensaft

Aktualisiert meine Antwort, sorry
— AB

Was meinten Sie mit der Bearbeitung der Liste? Muss ich die von Ihnen erwähnte Liste kopieren und einfügen?
— Zitronensaft

Und noch ein Update ...
— AB

2
Ja, es ist sicher, wenn Sie Ihre Änderungen /etc/cloud/templates/sources.list.tmplauch vornehmen . Aktualisiert meine Antwort =)
— AB
Durch die Nutzung unserer Website bestätigen Sie, dass Sie unsere Cookie-Richtlinie und Datenschutzrichtlinie gelesen und verstanden haben.
Licensed under cc by-sa 3.0 with attribution required.