<p>If you want to compile Bitcoin on CentOS 6, you will need more than just Bitcoin; several other dependencies are either missing or too old.</p>

<p>The particulars:</p>

<ul>
<li>Boost is too old. CentOS 6 has version 1.41, but Bitcoin requires features first introduced in Boost 1.47.</li>
<li>Berkeley DB is too old. CentOS 6 has version 4.7, but Bitcoin wants version 4.8 (but see below for more on this).</li>
<li>OpenSSL may be missing some elliptic curve algorithms required for Bitcoin, due to Red Hat's extremely conservative legal stance with respect to ECC. (See bugs <a href="https://bugzilla.redhat.com/show_bug.cgi?id=319901" rel="nofollow noreferrer">319901</a> and <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1020292" rel="nofollow noreferrer">1020292</a>, among others.)</li>
<li>The qrencode and miniupnpc libraries, necessary for the Bitcoin GUI to support QR codes and UPnP respectively, are missing entirely. (A server-only build doesn't need them, though.)</li>
<li>Older versions of the Bitcoin codebase did not work with Qt 4.6, the version shipped with CentOS 6, but required Qt 4.7. I fixed this with a one-liner, and it was patched upstream. This probably won't affect you, though, unless you're building old code for some reason.</li>
</ul>

<p>You also need these packages, which do exist in CentOS 6:</p>

<ul>
<li>db4-devel</li>
<li>autoconf automake libtool</li>
</ul>

<p>And you also need this package from EPEL:</p>

<ul>
<li>protobuf-devel</li>
</ul>

<p>For a build including the GUI, you also need:</p>

<ul>
<li>qt-devel desktop-file-utils</li>
</ul>

<p>Then you need to patch Bitcoin to accept using Berkeley DB 4.7; by default the configure script bails if BDB 4.8 is not present, even if you pass the configure option that is supposed to override this. And be warned that wallets created by this build may or may not work with Bitcoin compiled with BDB 4.8.</p>

<p>Then you need to patch it again to make it compile on the older versions of gcc and glibc shipped with EL6, as the current Bitcoin code assumes a compiler supporting C++11 is being used. It's a one line patch, but it took me half an hour to track down.</p>

<p>As you can see, this is kind of painful, and the <em>missing</em> libraries alone cause most people to give up.</p>

<p>Most of these packages (except miniupnpc) are in CentOS 7, so if you're going down this road, that's probably a better starting point.</p>

<p>I've been maintaining versions of those libraries, along with an SELinux-enhanced Bitcoin build, for a couple of years now. It's much easier to just <a href="https://www.cryptorpms.com/" rel="nofollow noreferrer">grab the repo and install the existing RPM packages</a> since I've done all this work for you. But if you really want to cover that ground again, there's your road map.</p>

CC BY-SA 4.0
2015-02-15T04:20:33.680Z
2020-01-06T18:44:41.167Z
2020-01-06T18:44:41.167Z
Michael Hampton
<p>Here's what I used successfully on Fedora 20:</p>

<pre><code>$ sudo yum groupinstall -y "Development Tools" "Development Libraries"
$ sudo yum install -y gcc-c++ libtool swig pyqt4-devel python-psutil python-twisted wget protobuf-devel
</code></pre>

<p>See <a href="https://bitcoin.stackexchange.com/a/30106/19021">https://bitcoin.stackexchange.com/a/30106/19021</a></p>

CC BY-SA 3.0
2014-08-18T20:34:18.647Z
2014-08-18T20:34:18.647Z
2017-04-13T12:47:32.940Z
averageradical
<p>I don't use Red Hat but I've found this guide quite recent: <a href="http://www.ripplex.biz/blog/compiling-bitcoin-on-centos-v6-4" rel="nofollow">http://www.ripplex.biz/blog/compiling-bitcoin-on-centos-v6-4</a></p>

<p>you'll find there the dep list.</p>

<p>I'm copying there here in case of 404 of the original website:</p>

<blockquote>
  <p>Install QT, boost, db4 and zlib development packages:</p>
  
  <blockquote>
    <p>yum install qt-devel boost-devel db4-devel zlib-devel</p>
  </blockquote>
</blockquote>

CC BY-SA 3.0
2013-08-15T17:21:49.547Z
I think it is safe. Probably compiling it you could optimize the binary for your pc, but I don't know it there would be any sensible difference. About the data dir is more a configuration issue than other. So I'd say it is ok
ddddavidee
CC BY-SA 3.0
2013-08-15T21:43:11.967Z
Interesting. What is the process of optimizing the binary? How is this done?
timetofly
CC BY-SA 3.0
2013-08-15T22:04:32.967Z
I think this would be more on topic on other SE sites, btw I would suggest to read this wikipedia page [Optimizing compiler](http://en.wikipedia.org/wiki/Optimizing_compiler) to understand what it means.
ddddavidee
CC BY-SA 3.0
2013-08-16T01:53:59.940Z
Thanks for the link. I'm solely a web developer, so don't know much about non-web development and compilation. Thanks a bunch.
timetofly
CC BY-SA 3.0
2013-08-13T14:54:05.150Z
Awesome, thanks! Before you answered, I ended up downloading the binary from sourceforge. Is it safe to compile this and use the new binary instead? As long as it uses the same data directory, it should still keep the same data, right?
timetofly
CC BY-SA 3.0
2013-08-13T14:13:54.003Z
2013-08-13T14:13:54.003Z
ddddavidee
<p>I'm using CentOS on my server, and when I try to compile bitcoin from the github source using <code>make -f makefile.unix</code>, I get a ton of errors. I'm assuming they're caused by dependency errors?</p>

<p>I've seen a bunch of dependency lists for debian-based linux distros which use apt-get, but I'd like to know what I need for CentOS. Installing the dependencies from the debian lists using yum show the packages as unavailable.</p>

<p>Here's the huge error list, if anyone wants it: <a href="http://pastebin.com/1y2wCH5N" rel="nofollow">http://pastebin.com/1y2wCH5N</a></p>

<bitcoin-core><linux><installation><bitcoin-qt-setup>
What are the bitcoin dependencies for red hat linux? Bitcoin fails to compile
timetofly
# What are the bitcoin dependencies for red hat linux? Bitcoin fails to compile

(Asked by: username_0 on 2013-08-13)

I'm using CentOS on my server, and when I try to compile bitcoin from the github source using `make -f makefile.unix`, I get a ton of errors. I'm assuming they're caused by dependency errors?

I've seen a bunch of dependency lists for debian-based linux distros which use apt-get, but I'd like to know what I need for CentOS. Installing the dependencies from the debian lists using yum show the packages as unavailable.

Here's the huge error list, if anyone wants it: <http://pastebin.com/1y2wCH5N>

**Tags:** bitcoin-core, linux, installation, bitcoin-qt-setup


---

## 3 answers

### Answer by username_1 on 2015-02-15. Score: 1

If you want to compile Bitcoin on CentOS 6, you will need more than just Bitcoin; several other dependencies are either missing or too old.

The particulars:

* Boost is too old. CentOS 6 has version 1.41, but Bitcoin requires features first introduced in Boost 1.47.
* Berkeley DB is too old. CentOS 6 has version 4.7, but Bitcoin wants version 4.8 (but see below for more on this).
* OpenSSL may be missing some elliptic curve algorithms required for Bitcoin, due to Red Hat's extremely conservative legal stance with respect to ECC. (See bugs [319901](https://bugzilla.redhat.com/show_bug.cgi?id=319901) and [1020292](https://bugzilla.redhat.com/show_bug.cgi?id=1020292), among others.)
* The qrencode and miniupnpc libraries, necessary for the Bitcoin GUI to support QR codes and UPnP respectively, are missing entirely. (A server-only build doesn't need them, though.)
* Older versions of the Bitcoin codebase did not work with Qt 4.6, the version shipped with CentOS 6, but required Qt 4.7. I fixed this with a one-liner, and it was patched upstream. This probably won't affect you, though, unless you're building old code for some reason.

You also need these packages, which do exist in CentOS 6:

* db4-devel
* autoconf automake libtool

And you also need this package from EPEL:

* protobuf-devel

For a build including the GUI, you also need:

* qt-devel desktop-file-utils

Then you need to patch Bitcoin to accept using Berkeley DB 4.7; by default the configure script bails if BDB 4.8 is not present, even if you pass the configure option that is supposed to override this. And be warned that wallets created by this build may or may not work with Bitcoin compiled with BDB 4.8.

Then you need to patch it again to make it compile on the older versions of gcc and glibc shipped with EL6, as the current Bitcoin code assumes a compiler supporting C++11 is being used. It's a one line patch, but it took me half an hour to track down.

As you can see, this is kind of painful, and the *missing* libraries alone cause most people to give up.

Most of these packages (except miniupnpc) are in CentOS 7, so if you're going down this road, that's probably a better starting point.

I've been maintaining versions of those libraries, along with an SELinux-enhanced Bitcoin build, for a couple of years now. It's much easier to just [grab the repo and install the existing RPM packages](https://www.cryptorpms.com/) since I've done all this work for you. But if you really want to cover that ground again, there's your road map.


---

### Answer by username_2 on 2014-08-18. Score: 0

Here's what I used successfully on Fedora 20:

```
$ sudo yum groupinstall -y "Development Tools" "Development Libraries"
$ sudo yum install -y gcc-c++ libtool swig pyqt4-devel python-psutil python-twisted wget protobuf-devel

```

See <https://bitcoin.stackexchange.com/a/30106/19021>


---

### Answer by username_3 on 2013-08-13. Score: 0

I don't use Red Hat but I've found this guide quite recent: <http://www.ripplex.biz/blog/compiling-bitcoin-on-centos-v6-4>

you'll find there the dep list.

I'm copying there here in case of 404 of the original website:

> Install QT, boost, db4 and zlib development packages:
>
> > yum install qt-devel boost-devel db4-devel zlib-devel

> **Comments:**
> **username_0**: Awesome, thanks! Before you answered, I ended up downloading the binary from sourceforge. Is it safe to compile this and use the new binary instead? As long as it uses the same data directory, it should still keep the same data, right?  
> **username_3**: I think it is safe. Probably compiling it you could optimize the binary for your pc, but I don't know it there would be any sensible difference. About the data dir is more a configuration issue than other. So I'd say it is ok  
> **username_0**: Interesting. What is the process of optimizing the binary? How is this done?  
> **username_3**: I think this would be more on topic on other SE sites, btw I would suggest to read this wikipedia page [Optimizing compiler](http://en.wikipedia.org/wiki/Optimizing_compiler) to understand what it means.  
> **username_0**: Thanks for the link. I'm solely a web developer, so don't know much about non-web development and compilation. Thanks a bunch.  

---

