Installation of Aliyun CentOS Pdf2htmlex

Source: Internet
Author: User
Tags cairo aliyun

Because the project Cnexpat need to use Pdf2htmlex, first on the virtual machine for a long time, the last to install successfully on the server.

Because it's a beginner of Linux, all the installation process is hard.

 

1. Upgrade gcc, request gcc >= 4.6.3
Wget Http://people.centos.org/tru/devtools-2/devtools-2.repo-O/etc/yum.repos.d/devtools-2.repo
Yum Install DEVTOOLSET-2-GCC devtoolset-2-binutils devtoolset-2-gcc-c++
Mv/usr/bin/gcc/usr/bin/gcc.backup
Ln-s/OPT/RH/DEVTOOLSET-2/ROOT/USR/BIN/GCC/USR/BIN/GCC
mv/usr/bin/g++/usr/bin/g++.backup
Ln-s/opt/rh/devtoolset-2/root/usr/bin/g++/usr/bin/g++

2. Install pkg-config-0.28
a).
Yum Install zlib-devel.x86_64 glib2-devel.x86_64–y
b). Installation of Pkg-config
TAR–XZVF pkg-config-0.28.tar.gz
CD pkg-config-0.28
./configure
Make && make install
Mv/usr/bin/pkg-config/usr/bin/pkg-configbak
Ln–s/usr/local/bin/pkg-config/usr/bin/pkg-config
Pkg-config--version

3. Install autoconf-2.69
xz–d AUTOCONF-2.69.TAR.ZX
TAR–XVF Autoconf-2.69.tar
CD autoconf-2.9
./configure–prefix=/usr
Make && make install

4. exportpkg_config_path=/usr/lib64/pkgconfig:/usr/lib/pkgconfig
Export Ld_library_path=/usr/lib64:/usr/lib
exportpng_requires= "Libpng"

5. Install freetype-2.5.2
Yum install libtool-ltdl-devel.x86_64 libtool patch gettext.x86_64fontconfig fontconfig-devel poppler-glib-devel.x86_ Libpng-devel.x86_64–y
TAR-ZXVF freetype-2.5.2.tar.gz
CD freetype-2.5.2
./configure--PREFIX=/USR
Make && make install

6. Install cairo-1.12.2
A. Yum install Libspectre Libspectre-devel
B. Installation of Pixman
Wgethttp://cairographics.org/releases/pixman-0.32.4.tar.gz
TAR-ZXVF pixman-0.32.4.tar.gz
CD pixman-0.32.4
./configure
Make
Make install
C. Installation of cairo-1.12.2
Xz–d CAIRO-1.12.2.TAR.XZ
Tar xvf Cairo-1.12.2.tar
CD cairo-1.12.2
./configure
Make && make install

7.Install FontForge
a). Yum install libjpeg-turbo.x86_64libjpeg-turbo-devel libjpeg-turbo-devel.x86_64 libtiff.x86_64 libtiff-devel openjpeg-devel.x86_64 openjpeg giflibgiflib-devel libxml2.x86_64 libxml2-devel libspiro.x86_64 Libuninameslist-devel.x86_64–y
b).Install Libunicodenames
Xz–d LIBUNICODENAMES-1.0.1.TAR.XZ
Tar XF Libunicodenames-1.0.1.tar
CD libunicodenames-1.0.1
./configure–prefix=/usr
Make && make install
c).Install readline-6.3
d). FontForge
Unzip Fontforge-pdf2htmlex.zip
CD Fontforge-pdf2htmlex
./autogen.sh
./configure–prefix=/usr--WITHOUT-LIBZMQ--without-x--without-iconv--disable-python-scripting-- Disable-python-extension
Make && make install

8.Install Poppler
a). Install fontconfig-2.2.3 (this does not seem to be installed)
Yum Install expat Expat-devel
wget http://down1.chinaunix.net/distfiles/fontconfig-2.2.3.tar.gz
Tar–xvzf fontconfig-2.2.3.tar.gz
CD fontconfig-2.2.3
./configure–prefix=/usr
Make && make install
b). cp/usr/lib/pkgconfig/cairo*.pc/usr/lib64/pkgconfig
cp/usr/lib/libcairo*/usr/lib64
Xz–d POPPLER-0.41.0.TAR.XZ
Tar XF Poppler-0.41.0.tar
CD poppler-0.41.0
./CONFIGURE–PREFIX=/USR--enable-xpdf-headers
Make && make install
Cp/usr/lib/pkgconfig/poppler*.pc/usr/lib64/pkgconfig
Cp/usr/lib/libpoppler*.so/usr/lib64

9. Install Pdf2htmlex
Yum Install Cmake–y
Yum Install JAVA-1.8.0-OPENJDK
Unzip Pdf2htmlex-master.zip
CD Pdf2htmlex-master
Cmake-denable_svg=off.
Make && make install
Ln-s/usr/local/lib/pdf2htmlex/usr/bin/pdf2htmlex


Reference Link: https://github.com/coolwanglu/pdf2htmlEX/wiki/Building

http://blog.csdn.net/knight_zhen/article/details/48268841

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.