Installing Microsoft Corefonts on CentOS 5
This is a thing I always have to google when I need to install Microsoft’s fonts in my CentOS installs so I thought I’d post a short dirty note here to remind me how to do it.
First of all we need some tools to build ourselves the RPM for msttcorefonts, so fire up your terminal and
[root@localhost ~]$ yum install cabextract rpm-build
When finished run the following as root
[root@localhost build]$ wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
[root@localhost build]$ rpmbuild -ba msttcorefonts-2.0-1.spec
[root@localhost build]$ rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
[root@localhost build]$ /sbin/service xfs reload
[root@localhost build]$ rpmbuild -ba msttcorefonts-2.0-1.spec
[root@localhost build]$ rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
[root@localhost build]$ /sbin/service xfs reload
That’s it. You should now have Microsoft’s standard fonts installed and ready to go.


Comments
Thanks, your instructions saved me some time!
That’s what they are here for
Saving me and hopefully someone else some time.
This is a thing I’ve found myself googling for over and over again so documenting it on my own site really saves me the time to.
Thanks for your help with this, I seem to be having trouble
I get this error after inserting ‘rpmbuild -ba msttcorefonts-2.0-1.spec’
error: Failed build dependencies:
cabextract is needed by msttcorefonts-2.0-1.noarch
Any ideas?
Thanks again
Did you install cabextract? I don’t think it’s in the normal yum database. So install RPM Forge repository. Here’s how:
http://dag.wieers.com/rpm/FAQ.php#B1
After that run yum install cabextract again.
Thankyou so much for the addition, I am getting much better with linux but it helps to have a little push in the right direction.
Thanks again for the excellent instructions
It takes some time getting used to. But don’t give up. Eventually the world of *NIX will unfold. It just takes some time and a lot of google use
Thanks a lot for sharing your knowledge! It saved a lot of trouble and works fine with CentOS 5.5 too.
Kind regards from Germany
Michael
Thanks for the comment. Good to know it still works on CentOS 5.5.
Never build rpm’s as root, rpmbuild works just fine with user privileges and there is no danger of autotools hosing your system with its idiocy.
Bob, you are absolutely correct. I’ll correct that. Never do anything as root if you can do it with another account.
Something is broken on weblink , I guess. I am getting following error after:
rpmbuild -ba msttcorefonts-2.0-1.spec
Can someone please help me out here?
+ wget –timeout=5 -O andale32.exe http://superb-west.dl.sourceforge.net/sourceforge/corefonts/andale32.exe
–2011-01-14 17:20:52– http://superb-west.dl.sourceforge.net/sourceforge/corefonts/andale32.exe
Resolving superb-west.dl.sourceforge.net… 216.34.181.96
Connecting to superb-west.dl.sourceforge.net|216.34.181.96|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2011-01-14 17:20:53 ERROR 404: Not Found.
error: Bad exit status from /var/tmp/rpm-tmp.74331 (%prep)
URL seems to be broken. I cannot access:
http://superb-west.dl.sourceforge.net
Can someone suggest me other way to install fonts?
For everyone experiencing download problems during the build process:
The build script uses random mirrors for getting the fonts (some of which may not work). The easiest workaround if you get a failure is to just try running the rpmbuild command again until you get a working mirror.
You can also modify line 38 of the spec file (mirrors=”…) and remove the mirror that is failing for you, then run rpmbuild again.
That works, Grisha, thanks!
It appears that none of the mirrors will work anymore at least from our location.
Bummer! This is a great way to install the fonts that I have used many times before but now no longer appears to work.
I am looking into copying he files manually from a windows install and modifying the script to look for the files locally.
That is unless someone has a better idea!
Awesome! Many thanks for your help! I use CentOS 5.5 with Elastix 2.0.3 and works like a charm! Best wishes, Carlos