These instructions will assist you in installing GnuCash 3.3 on CentOS Linux 7. These instructions will also work for the older GnuCash version 3.2.
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 cmake or boost). 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
yum -y install gcc-c++
tar xf cmake*.tar.gz
./bootstrap && make && make install
# Install boost 1.69 (latest at the time of writing this document. required is only 1.54)
yum -y install gcc-c++ python-devel
tar xfj boost*.tar.bz2
# now off to compile gnucash
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
tar -xjf gnucash*
# Option 1: Without Python bindings
/usr/local/bin/cmake ../gnucash-3.3 # this is where cmake was put from the previous section
# Option 2: With Python plugin and bindings.
yum -y install python34-devel
/usr/local/bin/cmake -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.4 -DWITH_PYTHON=ON ../gnucash-3.3 # this is where cmake was put from the previous section
# Both options:
make install/strip # strip removes all debug info on installing
ln -s /usr/local/lib64/python3.4/site-packages/gnucash /usr/lib64/python3.4/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
This should be it. If this was helpful for you, please click and view some of the ads on my page.
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).
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
# reboot might be required
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