Difference between revisions of "Installing Dependencies"

From GnuCash
Jump to: navigation, search
(Installing Main GnuCash Dependencies: added -0 to package name libglib2.0-0)
(Installing Main GnuCash Dependencies: gtk+3.0 is a source package. not installable. I believe these two bring in six gtk+3.0 packages.)
Line 41: Line 41:
 
sudo apt install google-mock                # 1.8.0 installs googlemock in a subdirectory of gtest
 
sudo apt install google-mock                # 1.8.0 installs googlemock in a subdirectory of gtest
  
sudo apt install gtk+3.0
+
sudo apt install libgtk-3-dev libgtk-3-bin  # gtk+3.0 >= 3.22.30
sudo apt install libgtk-3-dev
 
 
sudo apt install libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-dev  # > webkit2gtk-3.0
 
sudo apt install libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-dev  # > webkit2gtk-3.0
 
</SyntaxHighlight>.
 
</SyntaxHighlight>.

Revision as of 05:16, 18 September 2020

Installing Main GnuCash Dependencies

GnuCash depends on a variety of libraries to provide specialised functionality in addition to the GnuCash specific libraries produced by the build process. To build Gnucash you will primarily need to load the development headers for these libraries. To run GnuCash you will need to have the libraries themselves installed. The instructions below install both.

Up to date information on the dependencies may be obtained from:

The instructions here use the apt package manager common on Debian and derivatives like Ubuntu, Linux Mint ... In most cases these instructions can be simply translated to other Linux distributions. Package management tools used on some Linux distributions along with their install and remove commands and repository search commands are listed on the Package Managers wiki page. In addition to the formal dependencies listed on the Dependencies page, other packages may be listed here because they have been found to be missing in some distributions by users. In some cases they are packages that are commonly installed whenever other software has been loaded. Some distributions may also vary slightly in the packages that are distributed with them.

You can check whether the required libraries and/or headers are already installed by listing the installed packages. Run:

dpkg -l | grep <package-name>

in a shell on Debian based systems or

rpm -qa | grep <package-name>

on systems using rpm as the basic package manager (RHEL, Fedora, FreeBSD etc.), where <package-name> is the name of a package or an identifying substring of the package name. Reinstalling an already installed package generally will result in a message to that effect.

Package names given here are generally those on Debian based distributions. These may vary on other distributions. Your distribution will normally have some facility for searching its repository of available packages and listing available packages. These are listed for some Linux distributions on the Package Managers wiki page. You may also find relevant information in the Distribution Specific Issues page.

In Debian and derivates install from the repositories by running the following commands in a shell:

sudo apt install libtool libltdl-dev
sudo apt install icu-devtools libicu-dev
sudo apt install libglib2.0-0 libglib2.0-dev   #glib2 > v2.40.0
sudo apt install libboost-all-dev            # boost > 1.50.0  - requires locale and regex built with ICU support
sudo apt install guile-2.0 guile-2.0-dev     # guile >=2.0.0
sudo apt install swig2.0                     # swig  >2.0.10  - swig3.0 on some systems
                                             # not required if building from tarball,
                                             # but required if building from a git clone
sudo apt install libxml2 libxml++2.6-dev libxml2-utils
sudo apt install libxslt1.1 libxslt1-dev
sudo apt install xsltproc
sudo apt install texinfo                     # required for makeinfo
sudo apt install libsecret-1-0 libsecret-1-dev

# Only use the next 2 lines if you have not installed [[Google_Test | Google Test]] already.
sudo apt install libgtest-dev                # >=1.7.0
sudo apt install google-mock                 # 1.8.0 installs googlemock in a subdirectory of gtest

sudo apt install libgtk-3-dev libgtk-3-bin   # gtk+3.0 >= 3.22.30
sudo apt install libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-dev  # > webkit2gtk-3.0
.

Note: on some distributions swig3.0 may be available in the distribution repository rather than swig2.0. It may be used rather than swig2.0 by substituting swig3.0 in the command.

Some of the optional dependency packages are also available as sources from | SourceForge- Gnucash Dependencies. See the README and/or INSTALL files in each package for installation instructions for the packages.

Option Dependencies

The following are the dependencies of optional additions to GnuCash and should be incorporated if you need those specific options. These options are generally included by default in a standard build with no build switches specified. The exception is the Python binding extensions. You should generally include these libraries unless you specifically do not want the option included. You will have to use the appropriate option switches on the cmake command to change the default build options. See( build options).

Database Backend

GnuCash uses an xml file as its default storage. A database backend is available as an option if required. For users with minimal database administration experience, the sqlite3 option is likely to be easier to setup and administer. The database support is included by default but can be disabled if not required with a cmake option switch.

sudo apt install libdbi1 libdbi-dev         # > v0.8.3
and at least one of the following database backends:
sudo apt install libdbd-pgsql                # PostgreSQL database
sudo apt install libdbd-mysql                # MySQL database
sudo apt install libdbd-sqlite3              # Sqlite database

depending upon which databases you want to use.

OFX File importing

OFX file import support is normally built by default. These libraries should be included unless you do not want this option. Use the cmake option switch to disable it during the build if you do not require it.

sudo apt install libofx-dev   # This will automatically install the corresponding libofx<n> package as well.

AqBanking

In several countries you can use AqBanking for Online Banking. Aqbanking support is by default built in GnuCash. These libraries should be included unless you do not require this option. Use the appropriate cmake option switch to disable it if not required.

sudo apt install aqbanking-tools libaqbanking-dev   # > v4.0.0
sudo apt install gwenhywfar-tools libgwenhywfar60 libgwenhywfar60-dev
sudo apt install libgwengui-gtk3 libgwengui-gtk3-dev # included in tarball prior to v3.905/V4 beta

Python Support

Python Bindings to run your own scripts are by default not enabled in GnuCash. If required you should install these libraries and use the appropriate cmake option switch during the build.

sudo apt install python3-pytest

Return to:

Building_On_Linux

Building GnuCash