I can't install apertium on Colab due to it not finding a library

44 Views Asked by At

I am trying to run Apertium on Google Colab, all libraries are installed there but it can't locate lttoolbox. I have tried to add it to the path or even copied the file manually but I get the same error. Would someone know how to fix it?

I checked the docs and it is a common error: https://wiki.apertium.org/wiki/Installation_troubleshooting#No_package_lttoolbox.2Fapertium_found so I tried the suggested fix but nothing works.

This is what I tried:

!sudo apt-get install autoconf automake libtool pkg-config python3-dev
!sudo apt-get install apertium
!sudo apt-get install lttoolbox
!sudo apt-get install vislcg3
!sudo apt-get install hfst


!autoreconf -fvi
!./configure
!make

and I get:

checking pkg-config is at least version 0.9.0... yes
checking for lttoolbox >= 3.5.0... no
configure: error: Package requirements (lttoolbox >= 3.5.0) were not met:

No package 'lttoolbox' 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 LTTOOLBOX_CFLAGS
and LTTOOLBOX_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
/bin/bash ./config.status --recheck
/bin/bash: ./config.status: No such file or directory
make: *** [Makefile:348: config.status] Error 127

I've tried to do:

!export LTTOOLBOX_CFLAGS='/usr/bin/lttoolbox'
!export LTTOOLBOX_LIBS='/usr/bin/lttoolbox'

import os
os.environ['PKG_CONFIG_PATH'] += ":/usr/bin/lttoolbox"

!export PKG_CONFIG_PATH="/usr/bin/lttoolbox"

But none of those made any difference as I keep getting the same error.

0

There are 0 best solutions below