分页: 1 / 1

【求助】5.1Release 安装php-gd-5.2.17p6 失败

发表于 : 2012-07-27 0:18
unreal
OB版本和平台:5.1 release/macppc

我那台G4因为硬盘经常报错,昨天终于抽空换块硬盘全新安装5.1 ,安装源是官方CD。这次准备专门做web服务,所以只安装了 bsd.mp,base,etc,man 这几个我认为必须的包。然后安装php-5.2.17和一些基本的扩展(mysqli,soap,curl,bz2,mcrypt,xsl),但在安装 gd库时出现问题:
# pkg_add php-gd-5.2.17p6
Can't install php-gd-5.2.17p6 because of libraries
|library X11.15.0 not found
| not found anywhere
|library Xpm.8.0 not found
| not found anywhere
|library freetype.18.1 not found
| not found anywhere
Direct dependencies for php-gd-5.2.17p6 resolve to php-5.2.17p8 png-1.5.6p0 t1lib-5.1.2 jpeg-8c
Full dependency tree is femail-chroot-0.98 libiconv-1.14 t1lib-5.1.2 gettext-0.18.1p1 jpeg-8c femail-0.98 php-5.2.17p8 png-1.5.6p0 libxml-2.7.8p4
请帮我看看该咋整;另外 5.1 R 的phpMyAdmin 3.4.9只支持 php 5.3.10 了,或者我抽空再试试 php-gd-5.3.10 是否正常,只是担心一些较早的php软件会有问题。

回复: 【求助】5.1Release 安装php-gd-5.2.17p6 失败

发表于 : 2012-07-27 4:23
leo
安装一下xbase51.tgz试试,有时候即便你不需要X,但是其它应用可能需要X里的一些库。

回复: 【求助】5.1Release 安装php-gd-5.2.17p6 失败

发表于 : 2012-07-27 21:49
f5b
leo有理
http://www.openbsd.org/faq/faq4.html#FilesNeeded

Why do I have to install X for my non-graphical application?
Even if you have no intention of running X, some third party packages require the libraries or other utilities in X to be installed on your system. These applications can sometimes be satisfied simply by installing just xbase51.tgz, the rest of X is not always needed. Many people resist installing X on their system without valid reason:

By itself, installing X does not cause any program to execute on the system.
By itself, installing X on a system does not change the risk of external security issues.
If someone is already ON your system, they can most likely install whatever they wish, so the presence or absence of the X does not appreciably change the situation.
The only parts of X that are running are the parts required by your application.
The space required for X is relatively modest on modern hardware.

People sometimes waste a lot of time and effort trying to pick through xbase51.tgz and pull out just the files they need to install their application. This is not only pointless, but an effort that would have to be repeated for each upgrade cycle, which probably means you will not upgrade your system properly, creating REAL security problems.

IF you need X, just install it. It won't hurt you any more than the application you are needing it for will.

回复: 【求助】5.1Release 安装php-gd-5.2.17p6 失败

发表于 : 2012-07-27 22:37
unreal
感谢 leo兄 和 f5b兄 抽出宝贵时间给我帮助!
添加了 xbase51.tgz,php-gd 安上了:
# pkg_add php-gd-5.2.17p6
php-gd-5.2.17p6: ok
--- +php-gd-5.2.17p6 -------------------
You can enable this module by creating a symbolic
link from /etc/php-5.2.sample/gd.ini to
/etc/php-5.2/gd.ini.

ln -fs /etc/php-5.2.sample/gd.ini \
/etc/php-5.2/gd.ini
我把FAQ有关章节又读了一遍,内容浩瀚,得经常读读诶。好吧,我承认 xbase 也是必须组件,但对于php某些扩展需要Xlib仍然不满意,虽然是先有 X 再有 PHP 的。喷一下:PHP 开发者不具备真正滴UNIX精神~需要图形库的命令行软件有木有!这不合理啊有木有!

然后要折腾 OAMP 的迁移了,有空另帖再说。