如何在Acer Aspire One中安装php-gtk?

时间:2008-09-16 23:38:22

标签: php fedora php-gtk

我的应用程序在Ubuntu,Windows和华硕EeePC附带的Xandros中运行良好。

现在我们正在转向Acer Aspire One但是我在使用它附带的Fedora-like(Linpus Linux Lite)Linux下编译php-gtk时遇到了很多麻烦。

3 个答案:

答案 0 :(得分:3)

我设法在Fedora上安装了Phoronix测试套件所需的所有组件,但仍有一个问题。

# phoronix-test-suite gui
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
/usr/bin/phoronix-test-suite: line 28: [: /usr/share/phoronix-test-suite: unary operator expected

你需要两个不在Fedora中的软件包,php-gtk,但php-gtk也有它的依赖 - pecl-cairo

php-gtk需要从svn下载,因为tar.gz版本真的很旧而且不适用于php 5.3

以下是我如何构建所有组件。

su -c "yum install php-cli php-devel make gcc gtk2-devel svn"

svn co http://svn.php.net/repository/pecl/cairo/trunk pecl-cairo
cd pecl-cairo/
phpize
./configure
make
su -c "make install"

cd ..

svn co http://svn.php.net/repository/gtk/php-gtk/trunk php-gtk
cd php-gtk
./buildconf
./configure
make
su -c "make install"

cd ..

wget http://www.phoronix-test-suite.com/download.php?file=phoronix-test-suite-2.8.1
tar xvzf phoronix-test-suite-2.8.1.tar.gz
cd phoronix-test-suite
su -c "./install-sh"

所以请到我离开的地方,在Fedora上运行Phoronix测试套件。

答案 1 :(得分:1)

嗨,大家好我终于得到了这个工作的基本工作流程是这样的:

#!/bin/bash
sudo yum install yum-utils
#We don't want to update the main gtk2 by mistake so we download them
#manually and install with no-deps[1](and forced because gtk version
#version of AA1 and the gtk2-devel aren't compatible).
sudo yumdownloader --disablerepo=updates gtk2-devel glib2-devel
sudo rpm --force --nodeps -i gtk2*rpm glib2*rpm

#We install the rest of the libraries needed.
sudo yum --disablerepo=updates install atk-devel pango-devel libglade2-devel
sudo yum install php-cli php-devel make gcc

#We Download and compile php-gtk
wget http://gtk.php.net/do_download.php?download_file=php-gtk-2.0.1.tar.gz
tar -xvzf php-gtk-2.0.1.tar.gz
cd php-gtk-2.0.1
./buildconf
./configure
make
sudo make install

如果您想添加更多像gtk-extra这样的库,请先输入./configure -help,然后再查看可用的不同选项。

安装完成后,您需要将php_gtk2.so添加到/etc/php.ini动态扩展程序

extension=php_gtk2.so

来源:

[1]:Dependency problems on Acer Aspire One Linux

答案 2 :(得分:0)

如果你能给我们更多的东西继续,而不仅仅是麻烦使它编译;我们可能会更好地帮助您解决问题。