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

That’s it. You should now have Microsoft’s standard fonts installed and ready to go.

Related posts:

  1. Getting wireless network working on CentOS 5 and Thinkpad T42 I pulled an old IBM Thinkpad T42 to use...
  2. From installation to Active Directory client with CentOS 4.2 – Part two This is the second part of an article I started...

Comments

    Mark posted the comment on March 15th, 2009
  1. Thanks, your instructions saved me some time!

  2. Mats Hellman posted the comment on March 16th, 2009
  3. 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.

  4. Daniel Marshall posted the comment on March 25th, 2009
  5. 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

  6. Mats Hellman posted the comment on March 25th, 2009
  7. 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.

  8. Daniel Marshall posted the comment on March 25th, 2009
  9. 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

  10. Mats Hellman posted the comment on March 25th, 2009
  11. 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 ;)

  12. Michael posted the comment on May 20th, 2010
  13. 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

  14. Mats Hellman posted the comment on May 21st, 2010
  15. Thanks for the comment. Good to know it still works on CentOS 5.5.

  16. Bob posted the comment on December 1st, 2010
  17. 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.

  18. Mats Hellman posted the comment on December 1st, 2010
  19. Bob, you are absolutely correct. I’ll correct that. Never do anything as root if you can do it with another account.

  20. Saurabh Agrawal posted the comment on January 14th, 2011
  21. 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)

  22. Saurabh Agrawal posted the comment on January 14th, 2011
  23. URL seems to be broken. I cannot access:

    http://superb-west.dl.sourceforge.net

    Can someone suggest me other way to install fonts?

  24. Grisha posted the comment on February 2nd, 2011
  25. 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.

  26. BenBurch posted the comment on July 11th, 2011
  27. That works, Grisha, thanks!

  28. John S. posted the comment on July 14th, 2011
  29. 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!

  30. Carlos Caicedo-Russi posted the comment on July 19th, 2011
  31. Awesome! Many thanks for your help! I use CentOS 5.5 with Elastix 2.0.3 and works like a charm! Best wishes, Carlos