Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install mscorefonts on ec2

I am attempting to install mscorefonts on ec2, however I can't seem to find the magic combination of terminal commands to make it happen. I am using an m1.medium instance and uname -a returns Linux worker 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

On my personal laptop running: sudo apt-get install -y ttf-mscorefonts-installer works fine, however on my ec2 instance I get the following error message:

The following packages have unmet dependencies: ttf-mscorefonts-installer : Depends: defoma but it is not installable Recommends: ttf-liberation but it is not installable Recommends: x-ttcidfont-conf but it is not installable

indeed, I have not been able to find a way to install any of these components. I have attempted modifying my /etc/apt/sources.list file with these:

deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

as shown here: Getting Microsoft Calibri font on Amazon EC2 ubuntu, but even after running sudo apt-get update I am still unsuccessful. How can I install the mscore fonts on ec2? My application needs them to function.

like image 957
Trevor Avatar asked Mar 18 '23 16:03

Trevor


2 Answers

Eventually I figured this out. My solution was to enable the multiverse ppa's. Here is the script that I used.

#font installation -- required to properly display fonts used in 
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates multiverse" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
# preselect yes for ms EULA
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer

This works on EC2 ubuntu as of January 2015 and my local machine running ubuntu 14.04.

like image 150
Trevor Avatar answered Mar 20 '23 06:03

Trevor


Adding multiverse is the key. This worked for me on Ubuntu 14.04:

sudo apt-add-repository multiverse && sudo apt-get update
sudo apt-get install -y ttf-mscorefonts-installer
like image 38
hernvnc Avatar answered Mar 20 '23 06:03

hernvnc