在ec2上安装mscorefonts

时间:2014-12-11 20:05:57

标签: linux ubuntu fonts amazon-ec2

我正在尝试在ec2上安装mscorefonts,但我似乎无法找到终结命令的神奇组合来实现它。我使用的是m1.medium实例,uname -a返回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

在我的个人笔记本电脑上运行:sudo apt-get install -y ttf-mscorefonts-installer工作正常,但是在我的ec2实例上,我收到以下错误消息:

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

实际上,我无法找到安装任何这些组件的方法。我尝试使用以下代码修改/etc/apt/sources.list文件:

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

如下所示:Getting Microsoft Calibri font on Amazon EC2 ubuntu,但即使在运行sudo apt-get update后,我仍然不成功。如何在ec2上安装mscore字体?我的应用程序需要它们才能运行

2 个答案:

答案 0 :(得分:3)

最终我想出来了。我的解决方案是启用多元宇宙ppa。这是我使用的脚本。

#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

这适用于2015年1月的EC2 ubuntu以及运行ubuntu 14.04的本地计算机。

答案 1 :(得分:2)

添加多元宇宙是关键。这在Ubuntu 14.04上对我有用:

sudo apt-add-repository multiverse && sudo apt-get update
sudo apt-get install -y ttf-mscorefonts-installer