Installing Antiword on CentOS5
The Scenario
One of the feature that need to be implemented in one of our product is the ability to search keywords within a user curriculum vitae (CV). The system is able to upload/download resume in MS doc format and the Human Resource department can search any terms at interest for example ‘micro economy’ or ‘C++’. Our server is Linux (CentOS).
MS doc is a binary file. It need to be converted to text format and store the content into MySQL and perform FULLTEXT later. This is when Antiword come in handy. Antiword is a free MS Word reader for Linux.
Antiword Installation
[root@langkung antiword-0.37]# make all gcc -Wall -pedantic -O2 -DNDEBUG -c main_u.c gcc -Wall -pedantic -O2 -DNDEBUG -c asc85enc.c gcc -Wall -pedantic -O2 -DNDEBUG -c blocklist.c gcc -Wall -pedantic -O2 -DNDEBUG -c chartrans.c gcc -Wall -pedantic -O2 -DNDEBUG -c datalist.c gcc -Wall -pedantic -O2 -DNDEBUG -c depot.c gcc -Wall -pedantic -O2 -DNDEBUG -c dib2eps.c gcc -Wall -pedantic -O2 -DNDEBUG -c doclist.c gcc -Wall -pedantic -O2 -DNDEBUG -c fail.c gcc -Wall -pedantic -O2 -DNDEBUG -c finddata.c gcc -Wall -pedantic -O2 -DNDEBUG -c findtext.c gcc -Wall -pedantic -O2 -DNDEBUG -c fmt_text.c gcc -Wall -pedantic -O2 -DNDEBUG -c fontlist.c gcc -Wall -pedantic -O2 -DNDEBUG -c fonts.c gcc -Wall -pedantic -O2 -DNDEBUG -c fonts_u.c gcc -Wall -pedantic -O2 -DNDEBUG -c hdrftrlist.c gcc -Wall -pedantic -O2 -DNDEBUG -c imgexam.c gcc -Wall -pedantic -O2 -DNDEBUG -c imgtrans.c gcc -Wall -pedantic -O2 -DNDEBUG -c jpeg2eps.c gcc -Wall -pedantic -O2 -DNDEBUG -c listlist.c gcc -Wall -pedantic -O2 -DNDEBUG -c misc.c gcc -Wall -pedantic -O2 -DNDEBUG -c notes.c gcc -Wall -pedantic -O2 -DNDEBUG -c options.c gcc -Wall -pedantic -O2 -DNDEBUG -c out2window.c gcc -Wall -pedantic -O2 -DNDEBUG -c output.c gcc -Wall -pedantic -O2 -DNDEBUG -c pdf.c gcc -Wall -pedantic -O2 -DNDEBUG -c pictlist.c gcc -Wall -pedantic -O2 -DNDEBUG -c png2eps.c gcc -Wall -pedantic -O2 -DNDEBUG -c postscript.c gcc -Wall -pedantic -O2 -DNDEBUG -c prop0.c gcc -Wall -pedantic -O2 -DNDEBUG -c prop2.c gcc -Wall -pedantic -O2 -DNDEBUG -c prop6.c gcc -Wall -pedantic -O2 -DNDEBUG -c prop8.c gcc -Wall -pedantic -O2 -DNDEBUG -c properties.c gcc -Wall -pedantic -O2 -DNDEBUG -c propmod.c gcc -Wall -pedantic -O2 -DNDEBUG -c rowlist.c gcc -Wall -pedantic -O2 -DNDEBUG -c sectlist.c gcc -Wall -pedantic -O2 -DNDEBUG -c stylelist.c gcc -Wall -pedantic -O2 -DNDEBUG -c stylesheet.c gcc -Wall -pedantic -O2 -DNDEBUG -c summary.c gcc -Wall -pedantic -O2 -DNDEBUG -c tabstop.c gcc -Wall -pedantic -O2 -DNDEBUG -c text.c gcc -Wall -pedantic -O2 -DNDEBUG -c unix.c gcc -Wall -pedantic -O2 -DNDEBUG -c utf8.c gcc -Wall -pedantic -O2 -DNDEBUG -c word2text.c gcc -Wall -pedantic -O2 -DNDEBUG -c worddos.c gcc -Wall -pedantic -O2 -DNDEBUG -c wordlib.c gcc -Wall -pedantic -O2 -DNDEBUG -c wordmac.c gcc -Wall -pedantic -O2 -DNDEBUG -c wordole.c gcc -Wall -pedantic -O2 -DNDEBUG -c wordwin.c gcc -Wall -pedantic -O2 -DNDEBUG -c xmalloc.c gcc -Wall -pedantic -O2 -DNDEBUG -c xml.c gcc main_u.o asc85enc.o blocklist.o chartrans.o datalist.o depot.o dib2eps.o doclist.o fail.o finddata.o findtext.o fmt_text.o fontlist.o fonts.o fonts_u.o hdrftrlist.o imgexam.o imgtrans.o jpeg2eps.o listlist.o misc.o notes.o options.o out2window.o output.o pdf.o pictlist.o png2eps.o postscript.o prop0.o prop2.o prop6.o prop8.o properties.o propmod.o rowlist.o sectlist.o stylelist.o stylesheet.o summary.o tabstop.o text.o unix.o utf8.o word2text.o worddos.o wordlib.o wordmac.o wordole.o wordwin.o xmalloc.o xml.o -o antiword [root@langkung antiword-0.37]# make install mkdir -p /root/bin cp -pf antiword kantiword /root/bin mkdir -p /root/.antiword cp -pf Resources/* /root/.antiword [root@langkung antiword-0.37]# [root@langkung antiword-0.37]# cd .. [root@langkung usr]# ls -lh total 260K drwxr-x--- 9 charles users 4.0K Jun 7 12:38 antiword-0.37 drwxr-xr-x 2 root root 68K Jun 7 12:34 bin drwxr-xr-x 2 root root 4.0K Mar 30 2007 etc drwxr-xr-x 2 root root 4.0K Mar 30 2007 games drwxr-xr-x 36 root root 4.0K Jun 7 12:34 include drwxr-xr-x 6 root root 4.0K Mar 19 08:12 kerberos drwxr-xr-x 113 root root 68K Jun 7 12:34 lib drwxr-xr-x 12 root root 4.0K Jun 7 11:41 libexec drwxr-xr-x 11 root root 4.0K Jun 7 04:17 local drwxr-xr-x 2 root root 16K Jun 7 11:01 sbin drwxr-xr-x 215 root root 12K Jun 7 12:34 share drwxr-xr-x 2 root root 4.0K Mar 30 2007 src lrwxrwxrwx 1 root root 10 Jun 7 04:17 tmp -> ../var/tmp drwxr-xr-x 3 root root 4.0K Jun 7 04:19 X11R6 [root@langkung usr]# rm -fr antiword-0.37/ [root@langkung usr]#
Perhaps the usual error while performing ‘make’ is that the OS complaining it doesn’t exists. In that case, try this:
[root@langkung antiword-0.37]# yum -y --enablerepo=centosplus install gcc automake autoconf libtool make Loading "installonlyn" plugin Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for libtool to pack into transaction set. libtool-1.5.22-6.1.i386.r 100% |=========================| 18 kB 00:00 ---> Package libtool.i386 0:1.5.22-6.1 set to be updated ---> Downloading header for automake to pack into transaction set. automake-1.9.6-2.1.noarch 100% |=========================| 25 kB 00:00 ---> Package automake.noarch 0:1.9.6-2.1 set to be updated ---> Downloading header for autoconf to pack into transaction set. autoconf-2.59-12.noarch.r 100% |=========================| 17 kB 00:00 ---> Package autoconf.noarch 0:2.59-12 set to be updated ---> Downloading header for gcc to pack into transaction set. gcc-4.1.2-14.el5.i386.rpm 100% |=========================| 64 kB 00:01 ---> Package gcc.i386 0:4.1.2-14.el5 set to be updated --> Running transaction check --> Processing Dependency: imake for package: autoconf --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc --> Processing Dependency: libgomp = 4.1.2-14.el5 for package: gcc --> Processing Dependency: libgomp.so.1 for package: gcc --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for libgomp to pack into transaction set. libgomp-4.1.2-14.el5.i386 100% |=========================| 54 kB 00:01 ---> Package libgomp.i386 0:4.1.2-14.el5 set to be updated ---> Downloading header for imake to pack into transaction set. imake-1.0.2-3.i386.rpm 100% |=========================| 20 kB 00:00 ---> Package imake.i386 0:1.0.2-3 set to be updated ---> Downloading header for glibc-devel to pack into transaction set. glibc-devel-2.5-18.el5_1. 100% |=========================| 109 kB 00:03 ---> Package glibc-devel.i386 0:2.5-18.el5_1.1 set to be updated --> Running transaction check --> Processing Dependency: glibc-headers for package: glibc-devel --> Processing Dependency: glibc-headers = 2.5-18.el5_1.1 for package: glibc-devel --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for glibc-headers to pack into transaction set. glibc-headers-2.5-18.el5_ 100% |=========================| 142 kB 00:02 ---> Package glibc-headers.i386 0:2.5-18.el5_1.1 set to be updated --> Running transaction check --> Processing Dependency: kernel-headers for package: glibc-headers --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for kernel-headers to pack into transaction set. kernel-headers-2.6.18-53. 100% |=========================| 175 kB 00:02 ---> Package kernel-headers.i386 0:2.6.18-53.1.21.el5 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: autoconf noarch 2.59-12 base 647 k automake noarch 1.9.6-2.1 base 484 k gcc i386 4.1.2-14.el5 base 5.2 M libtool i386 1.5.22-6.1 base 680 k Installing for dependencies: glibc-devel i386 2.5-18.el5_1.1 updates 2.0 M glibc-headers i386 2.5-18.el5_1.1 updates 609 k imake i386 1.0.2-3 base 319 k kernel-headers i386 2.6.18-53.1.21.el5 updates 789 k libgomp i386 4.1.2-14.el5 base 76 k Transaction Summary ============================================================================= Install 9 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 11 M Downloading Packages: (1/9): libtool-1.5.22-6.1 100% |=========================| 680 kB 00:06 (2/9): automake-1.9.6-2.1 100% |=========================| 484 kB 00:04 (3/9): autoconf-2.59-12.n 100% |=========================| 647 kB 00:07 (4/9): gcc-4.1.2-14.el5.i 100% |=========================| 5.2 MB 00:45 (5/9): libgomp-4.1.2-14.e 100% |=========================| 76 kB 00:01 (6/9): kernel-headers-2.6 100% |=========================| 789 kB 00:08 (7/9): imake-1.0.2-3.i386 100% |=========================| 319 kB 00:04 (8/9): glibc-headers-2.5- 100% |=========================| 609 kB 00:09 (9/9): glibc-devel-2.5-18 100% |=========================| 2.0 MB 00:21 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: imake ######################### [1/9] Installing: autoconf ######################### [2/9] Installing: automake ######################### [3/9] Installing: kernel-headers ######################### [4/9] Installing: glibc-headers ######################### [5/9] Installing: glibc-devel ######################### [6/9] Installing: libgomp ######################### [7/9] Installing: libtool ######################### [8/9] Installing: gcc ######################### [9/9] Installed: autoconf.noarch 0:2.59-12 automake.noarch 0:1.9.6-2.1 gcc.i386 0:4.1.2-14.el5 libtool.i386 0:1.5.22-6.1 Dependency Installed: glibc-devel.i386 0:2.5-18.el5_1.1 glibc-headers.i386 0:2.5-18.el5_1.1 imake.i386 0:1.0.2-3 kernel-headers.i386 0:2.6.18-53.1.21.el5 libgomp.i386 0:4.1.2-14.el5 Complete! [root@langkung antiword-0.37]#
1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]