Go Back > Extra Stuff > Blogorrhea > EdH

Thread Tools
Old 2018-02-25, 14:40   #1
EdH's Avatar
"Ed Hall"
Dec 2009
Adirondack Mtns

4,877 Posts
Default How I Install CADO-NFS onto my Ubuntu Machines

(Note: I expect to keep the first post of each of these "How I Install..." threads up-to-date with the latest version. Please read the rest of each thread to see what may have led to the current set of instructions.)

This thread will explain the steps I use to install* CADO-NFS 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. In my case I needed to install python3 from the repository on my Debian based machines. More details about CADO-NFS and my early experiments can be found in the CADO-NFS thread.

*In this instance "install" is referring to the acquiring and compilation of the CADO-NFS package only. The binaries will have to be called using their respective paths.

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.

Ubuntu 18.04 Special Note: I've recently upgraded some 16.04 machines to 18.04 and have found that Python was removed, which caused CADO-NFS to crash. Simply using "sudo apt install python" resolved the issue. Because of this, I have added "python" to the below list of packages to install.

First, follow the procedure in:

How I Install GMP on my Ubuntu Machines

or, install GMP from the repositories.

If you have already installed most of the following packages, you can skip them, however, notice I have added the packages python and git to the list. You will now need git to retrieve the latest version of CADO-NFS using my steps, and if you are using Ubuntu 18.04, you may need to install python.

Open a terminal and enter:
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, enter:
sudo apt-get install g++ m4 zlib1g-dev make python git
Accept the prompt.

In your terminal, enter :
cd Math
git clone
cd cado-nfs
If prompted to download CMAke, choose y.

Note: The step above and the next step are described in the README file within the cado-nfs folder. It is recommended that it and the other READMEs referenced within be read for further details.

After CADO-NFS finishes compiling, its basic operation can be tested (per the README) by entering:
./ 90377629292003121684002147101760858109247336549001090677693
You should see lots of activity similar to:
Info:root: Using default parameter file ./parameters/factor/params.c60
Info:root: No database exists yet
Info:root: Created temporary directory /tmp/cado.1lafrwdi
Info:Database: Opened connection to database /tmp/cado.1lafrwdi/c60.db
Info:root: Set tasks.threads=8 based on detected logical cpus
Info:root: tasks.polyselect.threads = 2
Info:root: tasks.sieve.las.threads = 2
Info:Quadratic Characters: Total cpu/real time for characters: 0.16/0.0801561
Info:Square Root: Total cpu/real time for sqrt: 2.07/0.413262
Info:HTTP server: Shutting down HTTP server
Info:Complete Factorization: Total cpu/elapsed time for entire factorization: 47.08/38.8295
Info:root: Cleaning up computation data in /tmp/cado.1lafrwdi
760926063870977 773951836515617 260938498861057 588120598053661

Last fiddled with by EdH on 2020-09-21 at 11:46
EdH is offline   Reply With Quote
Old 2019-06-24, 02:24   #2
Dec 2017
Goldsboro, NC

1010102 Posts

What is the minimum Ubuntu version? Can this be installed on Ubuntu 14.04?
scole is offline   Reply With Quote
Old 2019-06-24, 03:23   #3
VBCurtis's Avatar
Feb 2005
Riverside, CA

156016 Posts

I am no linux expert, but I believe I ran it on 14.04 a few yrs ago. I believe you'll need python3, but the CADO installer may adapt to environments with only python.
Edit: The cado-nfs site states gcc 4.7 or newer is required.

Last fiddled with by VBCurtis on 2019-06-24 at 03:24
VBCurtis is offline   Reply With Quote
Old 2019-06-24, 03:42   #4
EdH's Avatar
"Ed Hall"
Dec 2009
Adirondack Mtns

4,877 Posts

Originally Posted by scole View Post
What is the minimum Ubuntu version? Can this be installed on Ubuntu 14.04?
Yes, 14.04 runs fine. I don't think I had to install python3, as I did with the Debian machines.

Edit: My 14.04 machine had gcc 4.8.4.

Last fiddled with by EdH on 2019-06-24 at 03:44
EdH is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How I Install ggnfs onto my Ubuntu Machines EdH EdH 2 2022-08-11 02:16
How I install YAFU onto my Ubuntu Machines EdH EdH 118 2021-09-29 12:42
How I Install GMP-ECM onto my Ubuntu Machines EdH EdH 12 2019-04-16 09:28
How I Install msieve onto my Ubuntu Machines EdH EdH 0 2018-02-23 14:43
How I Install GMP onto my Ubuntu Machines EdH EdH 0 2018-02-21 23:48

All times are UTC. The time now is 18:39.

Tue Sep 27 18:39:49 UTC 2022 up 40 days, 16:08, 0 users, load averages: 1.26, 1.21, 1.20

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔