View Single Post
Old 2018-02-21, 23:48   #1
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

7×13×37 Posts
Default How I Install GMP onto my Ubuntu Machines

This thread will explain the steps I use to install GMP onto a computer which is already running Ubuntu. This procedure should work for other linux distributions as well but the only other one I've currently tested is Debain.

Ubuntu does contain GMP in its repositories and they can be installed from the Software Installer provided. I will be describing here, how to acquire, compile and install the latest versions of the GMP package.

I will expect the user of these steps to be able to use the sudo command.

I will use a directory called Math for these installations. You may elect to replace "Math" with your own choice.

These instructions can be used as a reference only, if you want, but I will provide specifics that work for me. If you follow these steps as I provide them, you should end up with a working installation.

First, open a terminal and Enter:
Code:
sudo apt-get update
You should be prompted for your password. This prompt should only appear once for your terminal session, unless you leave it idle for a long time.

After the update completes and the user prompt reappears, type:
Code:
sudo apt-get install g++ m4 zlib1g-dev make p7zip
Accept the prompt.

Special Note: As of the release of GMP-6.2.0, msieve, subsequently YAFU and Aliqueit can have segmentation faults. I will cover the fix for msieve, which takes care of YAFU, but I have no fix for Aliqueit as of yet. If you intend to compile Aliqueit from its source, I suggest you install GMP-6.1.2 rather than GMP-6.2.0.

Download the latest release of GMP (or, download the GMP-6.1.2 release.)

Using the files program open the Math directory and then open the gmp-6.x.x archive. Extract to the Math folder and close your archive manager.

Rename the gmp-6.x.x folder to gmp.

In the terminal move into the gmp folder:
Code:
cd Math/gmp
Type:
Code:
./configure
When the configuration script ends, type:
Code:
make
When make ends, type:
Code:
make check
If all checked out, type:
Code:
sudo make install
Note that gmp should be installed to /usr/local/...

Return to your home directory:
Code:
cd ~/

Last fiddled with by EdH on 2020-06-18 at 21:28
EdH is online now   Reply With Quote