Install from source on Linux
This section assumes you already downloaded and uncompressed FreeLing sources in a folder of your choice. If not, please read Section Installing from source before continuing.
It also assumes you installed development tools and FreeLing dependencies. If not, please read Section Install FreeLing Requirements on Linux
Finally, it assumes you know where you want to install FreeLing (e.g.
/home/user/programs/freeling). You can omit this, and FreeLing will be installed in the default location
IMPORTANT: From this point on, we will refer to FreeLing installation folder (either chosen by you or the default location) as
Open a terminal and change to the folder where you uncompressed or cloned the downloaded FreeLing source.
Execute the commands:
mkdir build cd build cmake .. make install
This will install FreeLing in
You can speed up compilation using several processors with, e.g.,
make -j 4 install (you can replace
4 with the number of processors you want to use).
To change the destination directory, add option
-DCMAKE_INSTALL_PREFIX=$FLINSTALL to the
cmake command (where
$FLINSTALL is the path where you want to install FreeLing).
Note that cmake does not create an "uninstall" target. So, if you install in
/usr/local, you may need to selectively remove files when you want to uninstall FreeLing.
If you installed in a custom folder and want a clean re-install, you can delete folder
$FLINSTALL (be careful if it is
/usr/local, there may be other software installed there), and run
make install again from the
If you want a clean re-build, you can delete the
build folder, and repeat the whole procedure.
Available options that can be added to the
||Install FreeLing in given location (default:
||Build FreeLing with debugging traces (default:
||Build FreeLing without warning messages (default:
||Build FreeLing using boost::xpressive regexps instead of boost::regex (default:
||Download word embeddings files when installing (default:
||Build Java API (default:
||Build Python 2 API (default:
||Build Python 3 API (default:
Locale-related problems when installing
If you get an error about
bad locale when you enter
make install or when you try to execute the
analyzer sample program, you probably need to generate some locales in your system.
en_US.UTF8 locale as default during installation. If this locale is not installed in your system, you'll get an error during dictionary installation.
all languages in FreeLing should work with this locale, though Russian may need to have its own locale installed in the system.
The procedure to install a locale in your system varies depending on your distribution. For instance:
In Ubuntu, you must use the
sudo locale-gen en_US.UTF8
sudo locale-gen pt_BR.UTF8
sudo locale-gen ru_RU.UTF8
In Debian, you need to run the command:
and select the desired locales from the list.