How to Install GMP in Ubuntu

Written by andrea helaine
  • Share
  • Tweet
  • Share
  • Email

GNU Multiple Precision (GMP) is a library used by mathematical applications under Unix/Linux. A library is a set of functions doing a specific task that can be used by several programs to avoid having to write pieces of code that others already write. The GMP library is used specifically for arithmetic and is better off compiled on your computer to allow for the most optimised and therefore faster code to run on your computer. Compiling takes the raw code and transforms it into code that the machine can run.

Skill level:
Moderate

Other People Are Reading

Instructions

  1. 1

    Open your Internet browser on your Linux computer. Type "gmplib.org" in the address bar and press "Enter."

  2. 2

    Click on the latest version available next to "Download" on the top of the page. As of April 2011, the latest version is 5.0.1.

  3. 3

    Select to save on your Desktop when saving the file.

  4. 4

    Close your Internet browser.

  5. 5

    Launch a terminal from you application bar or the Linux/Unix menu.

  6. 6

    Type "cd", press "Enter" and then type "cd Desktop" before pressing "Enter" again.

  7. 7

    Type "tar -zxvf gmp-5.0.1.tar.bz2" and press "Enter." Be sure to replace 5.0.1 with the version you download.

  8. 8

    Type "cd gmp-5.0.1" and press "Enter."

  9. 9

    Type "./configure" and press "Enter." Let the computer check for the archive integrity and the presence of all the necessary software on your machine.

  10. 10

    Type "make" and press "Enter." Let the computer compile the package. That part can take a few minutes to a few hours depending on the speed of your computer.

  11. 11

    Type "sudo make install" to install the library on your computer.

Tips and warnings

  • Under Linux and Unix the case is important and "Desktop" is not equivalent to "desktop."
  • You can type "make check" after the end of the "make" command to test the newly created files for errors.
  • You will need to have the processing language M4 installed on your computer. If your computer does not have M4 installed, type "sudo install m4" and press "Enter" in the terminal.

Don't Miss

Resources

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.