Search code examples
perl-modulegpsbabel

Where to install gpsbabel so it works with GPS::Babel perl module?


I'm sad that I have to ask a question this simple but where should gpsbabel be installed in order to work with the GPS::Babel perl module? I can't seem to figure out the appropriate path and am hoping someone else who has it working can help. Thanks in advance for your help!


Solution

  • The GPS::Babel Perl module uses File::Which to find the gpsbabel executable.

    The script/program you're running that "use"'s GPS::Babel needs to be run by a user that, when File::Which::which() is called, can find the gpsbabel executable in that user's OS-dependent PATH environment variable.

    For example, installing gpsbabel on Linux results in gpsbabel being installed at /usr/local/bin. Since /usr/local/bin is in my path, when I invoke a Perl script use'ing GPS::Babel, File::Which::which finds gpsbabel in /usr/local/bin.

    What OS? What's your PATH environment variable set to? Are you sure the gpsbabel executable was installed correctly, ie, can you verify the directory/folder it's installed in?

    I had no issues downloading/installing gpsbabel and GPS::Babel just now and writing a quick hello world Perl script to use GPS::Babel, on Linux.