Difference between revisions of "Installing Dependencies"

From GnuCash
Jump to: navigation, search
(Installing Main GnuCash Dependencies)
m (Changes in aqbanking dependencies package name for more recent Debian/Ubuntu releases.)
 
(20 intermediate revisions by 6 users not shown)
Line 4: Line 4:
 
Up to date information on the dependencies may be obtained from:
 
Up to date information on the dependencies may be obtained from:
 
* the [[Dependencies]] wiki page;
 
* the [[Dependencies]] wiki page;
* [https://github.com/Gnucash/gnucash/blob/master/README.dependencies |GitHub GnuCash master branch README.dependencies]; or
+
* [https://github.com/Gnucash/gnucash/blob/master/README.dependencies GitHub GnuCash master branch README.dependencies]; or
 
* the README.dependencies file in your cloned directory or downloaded tarball.
 
* the README.dependencies file in your cloned directory or downloaded tarball.
  
The instructions here use the '''apt''' package manager common on Debian/Ubuntu derivatives. 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 |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.
+
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 |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:
 
You can check whether the required libraries and/or headers are already installed by listing the installed packages. Run:
Line 13: Line 13:
 
dpkg -l | grep <package-name>  
 
dpkg -l | grep <package-name>  
 
</SyntaxHighlight>
 
</SyntaxHighlight>
in a shell on Debian/Ubuntu based systems or
+
in a shell on Debian based systems or
 
<SyntaxHighlight lang="sh">
 
<SyntaxHighlight lang="sh">
 
rpm -qa | grep <package-name>  
 
rpm -qa | grep <package-name>  
Line 19: Line 19:
 
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.
 
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/Ubuntu 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 |Package Managers]] wiki page. You may also find relevant information in the [[Distribution_Specific_Issues | Distribution Specific Issues]] page.
+
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 |Package Managers]] wiki page. You may also find relevant information in the [[Distribution_Specific_Issues | Distribution Specific Issues]] page.
  
In Ubuntu and derivates install from the repositories by running the following commands in a shell:
+
In Debian and derivates install from the repositories by running the following commands in a shell:
 
<SyntaxHighlight lang="sh">
 
<SyntaxHighlight lang="sh">
 
sudo apt install libtool libltdl-dev
 
sudo apt install libtool libltdl-dev
sudo apt install libglib2.0 libglib2.0-dev  #glib2 > v2.40.0
 
 
sudo apt install icu-devtools libicu-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 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 guile-2.0 guile-2.0-dev    # guile >=2.0.0
Line 35: Line 35:
 
sudo apt install xsltproc
 
sudo apt install xsltproc
 
sudo apt install texinfo                    # required for makeinfo
 
sudo apt install texinfo                    # required for makeinfo
sudo apt install libsecret-1-0
+
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.
 
# Only use the next 2 lines if you have not installed [[Google_Test | Google Test]] already.
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>.
  
'''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 substiutuing '''swig3.0''' in the command.
+
'''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 [https://sourceforge.net/projects/gnucash/files/Dependencies/ | SourceForge- Gnucash Dependencies]. See the README and/or INSTALL files in each package for installation instructions for the packages.
 
Some of the optional dependency packages are also available as sources from [https://sourceforge.net/projects/gnucash/files/Dependencies/ | SourceForge- Gnucash Dependencies]. See the README and/or INSTALL files in each package for installation instructions for the packages.
  
 
=='''Option Dependencies''' ==
 
=='''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 the default options for the cmake switches in a standard build with no switches specified with the exception of the Python extensions. '''You should generally include these libraries unless you specifically do not want the option.''' You will have to use the appropriate option switches on the cmake command to change the default build options. See([[Gnucash Build Options | build options]]).  
+
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([[Gnucash Build Options | build options]]).  
  
 
=== '''''Database Backend''''' ===
 
=== '''''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.
 
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.
 
<SyntaxHighlight lang="sh">
 
<SyntaxHighlight lang="sh">
sudo apt-get install libdbi1 libdbi-dev        # > v0.8.3
+
sudo apt install libdbi1 libdbi-dev        # > v0.8.3
 
</SyntaxHighlight>
 
</SyntaxHighlight>
 
and at least one of the following database backends: <SyntaxHighlight lang="sh">
 
and at least one of the following database backends: <SyntaxHighlight lang="sh">
sudo apt-get install libdbd-pgsql                # PostgreSQL database
+
sudo apt install libdbd-pgsql                # PostgreSQL database
sudo apt-get install libdbd-mysql                # MySQL database
+
sudo apt install libdbd-mysql                # MySQL database
sudo apt-get install libdbd-sqlite3              # Sqlite database
+
sudo apt install libdbd-sqlite3              # Sqlite database
 
</SyntaxHighlight>
 
</SyntaxHighlight>
 
depending upon which databases you want to use.
 
depending upon which databases you want to use.
Line 68: Line 67:
 
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.
 
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.
 
<SyntaxHighlight lang="sh">
 
<SyntaxHighlight lang="sh">
sudo apt-get install libofx-dev  # This will automatically install the corresponding libofx<n> package as well.
+
sudo apt install libofx-dev  # This will automatically install the corresponding libofx<n> package as well.
 
</SyntaxHighlight>
 
</SyntaxHighlight>
  
 
=== '''''AqBanking''''' ===
 
=== '''''AqBanking''''' ===
Aqbanking support is normally built by default 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.
+
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.
 +
;Version: Ideally use the most recent (stable) version from https://aquamaniac.de/rdm/projects/aqbanking/files similar like our
 +
::stable ({{AqB Version}}) and
 +
:: nightly (Win: {{AqB Version nightly}}, Flatpak: {{AqB Version nightly FP}}) bundles.
 +
:;Recent requirements by feature:
 +
:::[{{URL:wp}}Single_Euro_Payments_Area Single Euro Payments Area (SEPA)]: FinTs …
 +
::::[{{URL:wp}}Payment_Services_Directive PSD2] in 2019: &ge; 6.0.0
 +
::::Bank internal transfer: 6.4.0
 +
:::Paypal: 5.7.8.0stable
 
<SyntaxHighlight lang="sh">
 
<SyntaxHighlight lang="sh">
sudo apt-get install aqbanking-tools libaqbanking-dev   # > v4.0.0
+
sudo apt install aqbanking-tools libaqbanking-dev
sudo apt-get install gwenhywfar-tools libgwenhywfar60 libgwenhywfar60-dev
+
sudo apt install gwenhywfar-tools libgwenhywfar60 libgwenhywfar60-dev
sudo apt-get install ktoblzcheck libktoblzcheck1-dev
+
sudo apt install libgwengui-gtk3 libgwengui-gtk3-dev # included in tarball prior to v3.905/V4 beta
 +
</SyntaxHighlight>
 +
 
 +
On more recent Debian and Ubuntu releases (from about 2022 onward), some packages have been renamed as follows:
 +
<SyntaxHighlight lang="sh">
 +
sudo apt install aqbanking-tools libaqbanking-dev
 +
sudo apt install gwenhywfar-tools libgwenhywfar79 libgwenhywfar-core-dev
 +
sudo apt install libgwengui-gtk3-79 libgwengui-gtk3-dev
 
</SyntaxHighlight>
 
</SyntaxHighlight>
  
 
=== '''''Python Support''''' ===
 
=== '''''Python Support''''' ===
Python support is not included by default in GnuCash. If required you should install these libraries and use the appropriate cmake option switch during the build.
+
[[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.
 
<SyntaxHighlight lang="sh">
 
<SyntaxHighlight lang="sh">
sudo apt-get install python3-pytest
+
sudo apt install python3-pytest
 
</SyntaxHighlight>
 
</SyntaxHighlight>
 +
 +
'''Return to:'''
 +
 +
[[Building_On_Linux | Building_On_Linux]]
 +
 +
[[Building | Building GnuCash]]
 +
[[category: Building]]

Latest revision as of 20:35, 30 May 2023

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.

Version
Ideally use the most recent (stable) version from https://aquamaniac.de/rdm/projects/aqbanking/files similar like our
stable (6.5.4) and
nightly (Win: 6.5.12beta, Flatpak: 6.5.12beta) bundles.
Recent requirements by feature
Single Euro Payments Area (SEPA): FinTs …
PSD2 in 2019: ≥ 6.0.0
Bank internal transfer: 6.4.0
Paypal: 5.7.8.0stable
sudo apt install aqbanking-tools libaqbanking-dev
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

On more recent Debian and Ubuntu releases (from about 2022 onward), some packages have been renamed as follows:

sudo apt install aqbanking-tools libaqbanking-dev
sudo apt install gwenhywfar-tools libgwenhywfar79 libgwenhywfar-core-dev
sudo apt install libgwengui-gtk3-79 libgwengui-gtk3-dev

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