Difference between revisions of "Installation troubleshooting"

From Apertium
Jump to navigation Jump to search
(→‎Shared libraries: this paragraph was present twice)
Line 2: Line 2:


Errors which may be encountered during [[installation]] and their solutions.
Errors which may be encountered during [[installation]] and their solutions.

==configure / autogen.sh errors==
===../ltmain.sh not found===
<pre>
configure.ac:115: required file `../ltmain.sh' not found
</pre>
The clue here is the "..". Autotools is looking for an auxiliary file in the parent directory of this one. This will happen if you check out one project folder inside another one (e.g. check out the lttoolbox folder inside apertium-en-es, or similar).

Solution: make a new subdirectory in your home folder and check out again there (e.g. mkdir ~/src && cd ~/src && svn co …)


==Errors==
==Errors==

Revision as of 10:57, 27 March 2012

Errors which may be encountered during installation and their solutions.

configure / autogen.sh errors

../ltmain.sh not found

configure.ac:115: required file `../ltmain.sh' not found

The clue here is the "..". Autotools is looking for an auxiliary file in the parent directory of this one. This will happen if you check out one project folder inside another one (e.g. check out the lttoolbox folder inside apertium-en-es, or similar).

Solution: make a new subdirectory in your home folder and check out again there (e.g. mkdir ~/src && cd ~/src && svn co …)

Errors

Package not found

When running configure script for Apertium

You may encounter an error similar to the following, the particular packages in error may differ (i.e., the error list here was on Mandriva Linux 2009).

checking pkg-config is at least version 0.9.0... yes
checking for APERTIUM... configure: error: Package
requirements (lttoolbox-3.0 >= 3.0.0 libxml-2.0 >= 2.6.17
libpcre >= 6.4) were not met:

No package 'lttoolbox-3.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable
if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables
APERTIUM_CFLAGS and APERTIUM_LIBS to avoid the need to
call pkg-config. See the pkg-config man page for more details.

This is because Apertium cannot find the location where the lttoolbox-3.0.pc file was installed. If you have installed lttoolbox (which you should have done prior to attempting to install Apertium) in a non-standard prefix (or sometimes even /usr/local) the configure script will not be able to find it.

First find the location of this file (it should be in $(PREFIX)/lib/pkgconfig) and then run this command:

$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Replace /usr/local with the appropriate prefix.

When running configure script for language pair data

checking pkg-config is at least version 0.9.0... yes
checking for APERTIUM... configure: error: Package
requirements (apertium-3.0 >= 3.0.0) were not met:

No package 'apertium-3.0' found

Similar to when running configure script for Apertium installation, but now the apertium-3.0.pc is not being found. Adjust PKG_CONFIG_PATH environment variable to the correct path location.


Workaround for apertium-3.1

If you installed from SVN chances are that you got apertium-3.1 which for some (by me unknown) reason makes autogen fail I used the following workaround:

cd /usr/local/lib/pkgconfig/
sudo cp lttoolbox-3.1.pc lttoolbox-3.0.pc
sudo cp apertium-3.1.pc apertium-3.0.pc

--Jacob Nordfalk 07:11, 11 October 2008 (UTC)

Command not found

When running make for language pair data

you may encounter an error like the following when attempting to compile the language pair data (example: en-fr):

$ make
make  all-am
make[1]: Entering directory `/<path>/apertium-en-fr'
apertium-validate-dictionary apertium-en-fr.en.dixtmp1
make[1]: apertium-validate-dictionary: Command not found
make[1]: *** [en-fr.automorf.bin] Error 127
make[1]: Leaving directory `/<path>/apertium-en-fr'
make: *** [all] Error 2

This occurs because the Apertium application(s) are not on your path. Add it to your path (e.g., for BASH shell use export PATH=$PATH:/usr/local/bin on command line or similar in your user .bash_profile file.


Shared libraries

lt-comp: error while loading shared libraries:
liblttoolbox3-3.0.so.0: cannot open shared object file:
No such file or directory

This is because lt-comp cannot find where your liblttoolbox libs are installed. You may need to do one of several things:

  1. If you have installed it in an odd location, do: export LD_LIBRARY_PATH=/path/to/weird/libdir
  2. If you have installed it in /usr/local
    1. Check to see if /usr/local/lib is in /etc/ld.so.conf, if it is, run ldconfig
    2. If it isn't, either add /usr/local/lib to /etc/ld.so.conf and re-run ldconfig, or do step 1.

PCRE

checking for pcreposix.h... no
configure: error: *** unable to locate pcreposix.h include
file ***

You don't have the PCRE (Posix-compatible regular expressions) library header files installed, if you're in Debian or Ubuntu, do:

# apt-get install libpcre3-dev

on Fedora, do:

# yum install pcre-devel

Missing pair

$  echo "Eso es un test" | apertium es-ca
Error: Mode es-ca does not exist. Try one of:
README

Looks like you don't have any language pairs installed, did you run make install in the language pair directory?

If you did, email the output of

$ cat /usr/local/bin/apertium | grep -e APERTIUM -e DEFAULT

...obviously replace /usr/local/bin/apertium with the location of the $(prefix)/bin/apertium

and the steps you took to compile apertium to the apertium-stuff mailing list.

You don't have cg-proc installed

Apertium for Welsh now requires this constraint grammar package to help with disambiguation. For install instructions go here