我有一个在Ubuntu,Windows和Asus EeePC附带的Xandros上都能很好运行的应用程序。
现在,我们正在使用Acer Aspire One,但要使php-gtk在随其附带的类似Fedora(Linpus Linux Lite)的Linux下进行编译,我遇到了很多麻烦。
我有一个在Ubuntu,Windows和Asus EeePC附带的Xandros上都能很好运行的应用程序。
现在,我们正在使用Acer Aspire One,但要使php-gtk在随其附带的类似Fedora(Linpus Linux Lite)的Linux下进行编译,我遇到了很多麻烦。
我设法在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
需要从svn下载php-gtk,因为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"
因此,请带我去让Phoronix测试套件在Fedora上运行。
嗨,大家好,我终于得到了这个东西,它的基本工作流程是这样的:
#!/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
资料来源:
如果您可以给我们更多的工作要做,而不仅仅是使其编译困难; 我们可能会更好地为您解决问题。