11.2. Installing Finance::Quote

To determine if the Perl module Finance::Quote is already installed on your system, type perldoc Finance::Quote in a terminal window and check to see if there is any documentation

NAME
    Finance::Quote - Get stock and mutual fund quotes from various exchanges

SYNOPSIS
       [...]

available. If you are now shown documentation, then Finance::Quote is already installed and you can configure periodical quotes update as described in Section 11.3, “Configuring for Getting Quotes Periodically”. If no documentation is displayed, you will have to continue with this chapter.

The process of installing Finance::Quote depends on the system. For the different supported systems, you can follow the instructions below:

Procedure 11.4. On Linux

  1. Close GnuCash.

  2. Run the gnc-fq-check command to verify that the program is already in a directory that is entered in the PATH environment variable. [9]

    Tip

    If gnc-fq-check is not in your PATH, perhaps because you built the application yourself using unusual paths, search the folder where GnuCash is installed, e.g. with the command which gnc-fq-check, and change to that directory. It is a good idea to include the current directory in the PATH environment variable. Please refer to the documentation for your distribution for more information.

  3. Next, update with sudo gnc-fq-update or su -c gnc-fq-update with root privileges Finance::Quote It depends on your distribution.

    This will launch a Perl CPAN [10] module internally. When you launch the CPAN module for the first time, you must setup and configure it. However, on the most systems if you accept the default settings or answer the first question Are you ready for manual configuration? [yes] with no, you will be able to install Finance::Quote successfully.

  4. Run gnc-fq-dump to check Finance::Quote works properly. This program returns the version number of Finance::Quote module currently installed as well as a list of sources available via the Finance::Quote module. It will also inform you if there is a problem with your installation or if it is missing, and may suggest a fix.

Procedure 11.5. On macOS

  1. Close GnuCash.

  2. Install Xcode if it is not installed.

    XCode is an optional item from your macOS distribution DVD.

  3. Run the Update Finance Quote app in the GnuCash dmg.

    You can run it from the dmg or copy it to the same folder to which you copied GnuCash. It will open a Terminal window and run a script for you which will ask lots of questions. Accept the default for each unless you know what you’re doing.

Procedure 11.6. On Windows

  1. Close GnuCash.

  2. Run StartGnuCashInstall Online Price Retrieval . This is a small utility that installs Finance::Quote for you.



[9] If you’ve installed GnuCash packages provided by your distribution, gnc-fq-check must be on your PATH. The currentness of your distribution can be checked under Finance::Quote- versions.