Linux 服务器上的 PDF Lib 安装失败.使用 pecl 安装 pdflib [英] PDF Lib install fail on linux server. Using pecl install pdflib

查看:24
本文介绍了Linux 服务器上的 PDF Lib 安装失败.使用 pecl 安装 pdflib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的服务器上安装 pdflib 并收到错误:

I'm attempting to install pdflib on my server and receiving the error:

configure: error: pdflib.h not found!检查传递给 --with-pdflib= 的路径.PATH 应该是安装前缀目录.错误:/root/tmp/pear/pdflib/configure --with-pdflib=/usr/local' 失败

我在终端输入以下内容:

I am entering the following in terminal:

pecl 安装 pdflib

pecl install pdflib

pdflib 安装路径?:

/usr/local

推荐答案

我是这样解决的:下载最新的 http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz

I got it solved this way: Downloaded latest http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz

# cd /home/xxx/Downloads/
# wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz

解压-gzip

# tar xzf PDFlib-Lite-7.0.5p3.tar.gz
# cd PDFlib-Lite-7.0.5p3

看看它是否包含 pdflib.h

See, if and where it contains pdflib.h

# find . -name 'pdflib.h'
./PDFlib-Lite-7.0.5p3/libs/pdflib/pdflib.h

通过pecl安装

# pecl install pdflib

如果它要求路径,请输入相同的完整路径/home/xxx/Downloads/pdf/PDFlib-Lite-7.0.5p3/libs/pdflib从安装消息中可以看出,它是否以及在何处添加了文件 pdf.so(在 php 扩展目录中,此目录名称可能会有所不同,但文件 pdf.so 必须存在):

If it asks for path, enter the same full path /home/xxx/Downloads/pdf/PDFlib-Lite-7.0.5p3/libs/pdflib See from installation messages, if and where it added file pdf.so (in php extensions directory, this dir name may vary but file pdf.so has to exist):

# ls -la /usr/lib/php5/20090626

更改pdf.ini

# nano /etc/php5/apache2/php.ini

最后添加

extension=pdf.so

(您可能也想在命令行 php conf/etc/php5/cli/php.ini 中添加)

(You may want to add it in command line php conf /etc/php5/cli/php.ini too)

重新加载apache

# service apache2 reload

看看,如果这个扩展出现

See, if this extension appears

  • 对于 Apache,如果有关于 PDFlib 的新内容,请查看 phpinfo() 函数的输出PDFlib已启用 PDFlib 支持PDFlib GmbH 二进制版本 7.0.5p3PECL 3.0.0 版修订 $Revision: 1.80.2.2 $

  • for Apache see output of phpinfo() function if there is something new regarding PDFlib PDFlib PDFlib Support enabled PDFlib GmbH Binary-Version 7.0.5p3 PECL Version 3.0.0 Revision $Revision: 1.80.2.2 $

用于命令行

按提示输入

# php -i |grep PDF
PDFlib
PDFlib Support => enabled
PDFlib GmbH Binary-Version => 7.0.5p3

这篇关于Linux 服务器上的 PDF Lib 安装失败.使用 pecl 安装 pdflib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆