Hunter的大杂烩 技术学习笔记

September 4, 2013

在suse11 sp1下安装pdf2htmlex

Filed under: 技术话题 — hunter @ 8:46 pm

参考官网:https://github.com/coolwanglu/pdf2htmlEX/wiki/Building
注:pdf2htmlex 的依赖项太多,而且cmake不大会用,不知道如何查找非系统路径下的第三方依赖库,所以这次安装比较dirty,没能走“绿色”安装路线

1. 安装cmake
a. wget http://www.cmake.org/files/v2.8/cmake-2.8.11.2-Linux-i386.sh
b. sh cmake-2.8.11.2-Linux-i386.sh –prefix=/usr/local/cmake

2. 安装xz
a. 无聊的人们继续发明压缩工具:http://tukaani.org/xz/
b. ./configure;make;make install

3. 安装poppler
a. http://poppler.freedesktop.org/
b. 因为我的fontconfig是绿色安装的(见前面文章),所以需要配置一个环境变量,以便pkg_config能找到它
PKG_CONFIG_PATH=/usr/local/fontconfig/lib/pkgconfig ./configure –enable-xpdf-headers
c. make;make install

4. 安装git
a. 起始可以不用装,原打算从github上get source下来,后来发现可以下载压缩包
wget “http://download.chinaunix.net/down.php?id=44365&ResourceID=3744&site=1”
./configure –with-zlib=/usr/local/zlib;make ;make install

5. suse11 sp1太旧了,pdf2htmlex又比较赶时髦,需要升级很多东西:libtool/autoconf及相关依赖的rpm (libltdl7)
http://software.opensuse.org/package/autoconf
http://software.opensuse.org/package/libtool

使用强制安装参数: rpm -i –force
注:fontforge/poppler似乎也有对应的rpm,不过这次打算用source来装

5. 安装 fontforge
a. 从 sf上抓代码或者从github上下载压缩包都可以
git clone https://github.com/coolwanglu/fontforge.git fontforge-git
https://github.com/coolwanglu/fontforge/tree/tmp
b. 用绿色安装法的后遗症,需要配置一堆的pkg_config_path
PKG_CONFIG_PATH=/usr/local/zlib/lib/pkgconfig/:/usr/local/glib/lib/pkgconfig/:/usr/local/freetype/lib/pkgconfig/ ./configure –without-libzmq –without-x –without-iconv –disable-python-scripting –disable-python-extension
c. make;make install

6. 安装gcc …
a. 赶时髦的pdf2htmlex 告诉我有uniq_ptr 不是 std 下的库。。。杯具,要装gcc… gcc属于系统级软件,牵一发动全身,实在不想把机器搞乱,准备装个“绿色”版的gcc
参考:http://hi.baidu.com/graphis/item/ab5ad4bb79088ac085dd792d

http://blog.csdn.net/ztz0223/article/details/7960228

7. 安装pdf2htmlex
a. git clone git://github.com/coolwanglu/pdf2htmlEX.git
b. cd pdf2htmlEX.git
c. ./autogen.sh
d. make

未完待续…

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress