mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   EdH (https://www.mersenneforum.org/forumdisplay.php?f=152)
-   -   How I Install GMP onto my Ubuntu Machines (https://www.mersenneforum.org/showthread.php?t=23079)

EdH 2018-02-21 23:48

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
[/code]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
[/code]Accept the prompt.

[B]Special Note:[/B] 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.

[URL="https://gmplib.org/download/gmp/gmp-6.2.0.tar.xz"]Download the latest release of GMP[/URL] (or, [URL="https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz"]download the GMP-6.1.2 release[/URL].)

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
[/code]Type:
[code]
./configure
[/code]When the configuration script ends, type:
[code]
make
[/code]When make ends, type:
[code]
make check
[/code]If all checked out, type:
[code]
sudo make install
[/code]Note that gmp should be installed to /usr/local/...

Return to your home directory:
[code]
cd ~/
[/code]


All times are UTC. The time now is 11:15.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.