Ubuntu10.04 compile LTP1. download LTP source code http://ir.hit.edu.cn/ltp/2.download installation gccand gfortrana) according to the requirements of the LTP web page download the gcc-4.1 and g ++-4.1, ubuntu10.04 can directly sudoapt-getinstall
Compile LTP in Ubuntu 10.04
1. Download LTP source code
Http://ir.hit.edu.cn/ltp/
2. Download and install Gcc and gfortran
A) according to the requirements of the LTP web page to download the gcc-4.1 and g ++-4.1, ubuntu 10.04 can directly sudoapt-get install gcc-4.1 and sudoapt-get install g ++-4.1, (later versions of Ubuntu can not be directly installed with apt-get, there is no gcc-4.1 in the software source), but because ubuntu10.04 default gcc/g ++ for gcc4.4, so switch gcc version to gcc-4.1, specific can refer to http://www.linuxidc.com/linux/2011-03/33789.htm.
PS: only 4.1 was used according to official instructions, and gcc, g ++, and later versions were not tried.
B) install gfortran
Sudo apt-get installgfortran
3. Download and compile Boost 1.37
Compile according to instructions
1) sudo. /configure-with-libraries = regex # Only regex is compiled. The default installation path is/usr/local, and the include path is/usr/local/include, all lib files are under/usr/local/lib.
2) sudo make install
3) enter/usr/local/lib, copy the libboost_regex-gcc4.1-mt-1_37.so file, named libboost_regex.so
4) Add: exportLIBRARY_PAHT = "/usr/local/lib" to the/etc/profile file"
4. Compile LTP
A)./configure
Chmod a + xconfigure needs to be set for File Permissions
B) make
At this time, the error "boost/cregex. hpp" will not be found: boost/cregex. hpp: no suchdictionory or file. In this case, you must first execute the following two commands to execute the export header file path:
Export C_INCLUDE_PATH = "/usr/local/include/boost_1.37 /"
Export CPLUS_INCLUDE_PATH = "/usr/local/include/boost_1.37 /"
Note: the/usr/local/include/boost_1.37/path must have a boost folder.
Then make, it should be okay.
C) there will be two executable binary files ltp_test and ltp_test_xml In the src/test/folder of LTP.
Run these two files directly. You can see the usage and input parameters.
For example:
./Ltp_test
You can see usage:./ltp_test For specific parameters, see ltp_test.cpp.
D) enter the data in the format. A bug may occur after the running is completed, as if there were two free memory problems, without affecting the use.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2