Install GnuCash 3.6 on CentOS 7

These instructions will assist you in installing GnuCash 3.6 on CentOS Linux 7. These instructions will also work for the older GnuCash versions 3.2, 3.3, 3.4 and 3.5, Only difference is the cmake version, that was not available at the time of publishing. Check here:
Install GnuCash 3.3 on CentOS 7

Unfortunately, installing GnuCash 3 onto CentOS 7 is not as straight forward as installing the package (as it was for the older GnuCash 2 versions). This is due to newer required OS libraries that are/will not be shipped on CentOS 7 (like boost or cmake ). So you have to compile the new libraries yourself and run them in parallel to the OS libraries. The overall process can take some hours, depending on your computer speed.

Have a look...

yum update # Get the latest updates just in case...

# let's start with building cmake
cd /tmp
yum -y install gcc-c++
CMAKE_VERSION=3.15.3
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz
tar xf cmake-${CMAKE_VERSION}.tar.gz
cd cmake-${CMAKE_VERSION}
./bootstrap && make && make install

# Install boost 1.70

cd /tmp
yum -y install gcc-c++ python-devel
wget https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_70_0.tar.bz2
tar xfj boost*.tar.bz2
cd boost_*
./bootstrap.sh
./b2
./b2 install
export BOOST_ROOT=/tmp/boost_1_70_0

# now off to compile gnucash

cd /tmp
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # install EPEL
yum -y install glib2-devel libxml2-devel libxslt-devel webkitgtk4-devel guile-devel gwenhywfar-devel aqbanking-devel ktoblzcheck-devel libofx-devel libsecret-devel libdbi-devel libdbi-dbd-mysql gtest-devel gmock-devel  iso-codes-devel
wget https://github.com/Gnucash/gnucash/releases/download/3.6/gnucash-3.6.tar.bz2
tar -xjf gnucash*
mkdir build-gnucash-3.6
cd build-gnucash-3.6
export BOOST_ROOT=/tmp/boost_1_69_0
# Option 1: Without Python bindings
cmake ../gnucash-3.6
# Option 2: With Python plugin and bindings.
yum -y install python36-devel
cmake -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6 -DWITH_PYTHON=ON ../gnucash-3.6

# Both options:
# NOTE: Should you have seen that a different boost version is being used, remove it for the time of installation (path is mentioned in the cmake log). Otherwise you will get an error message during GnuCash compilation: ice-9/boot-9.scm:106:20: In procedure dynamic-link: file: "libtest-core-guile", message: "file not found"

make
make install/strip # strip removes all debug info on installing

ln -s /usr/local/lib64/python3.6/site-packages/gnucash /usr/lib64/python3.6/site-packages/gnucash # Optional: do this if you want to use the python libraries in your custom code

# To start gnucash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib # you have to do this every time. See my comment in the section LD_LIBRARY_PATH below
gnucash

This should be it. If this was helpful for you, please click and view some of the ads on my page.

Comment on LD_LIBRARY_PATH

I intentionally did not add /usr/local/lib to the global library path to keep aligned with RedHat/CentOS as a long term stable strategy. One of the reasons to use Red Hat/CentOS is to have a reliable and stable system. The drawback is the lack of latest versions for many components (leading us to manually compile GnuCash, boost and cmake instead of using out of the box packages).  Now when adding our self-compiled, latest boost version to the global path will directly impact all other applications that are using the boost library (or in the /usr/local/lib folder) and depend on/tested on the built in version.

If you do accept the risk and would like to add the library path to your global settings, follow the below (untested by me) steps options. Option 1 is for real global settings. Option 2 is only for specific users (so you can use different users for different applications).

Option 1: True global setting

echo "/usr/local/lib" > /etc/ld.so.conf.d/gnucash.conf # I chose gnucash.conf as a file name to clearly mark the purpose. Maybe you want to chose local.lib.conf or anything else
ldconfig
# reboot might be required

Option 2: User specific

This really depends on the shell you are using (bash as default). If you are unsure, run "env | grep SHELL=" . For your own user, run this (add the above export line to the file):
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> ~/.bashrc # replace .bashrc with .<shell>rc if you use a different shell

For other users, use this command (replacing <username>)
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> ~<username>/.bashrc # replace .bashrc with .<shell>rc if you use a different shell