我有一個在Ubuntu,Windows和Asus EeePC附帶的Xandros上運行得非常好的應用程序。如何在宏碁Aspire One中安裝php-gtk?
現在我們正在轉向Acer Aspire One,但我在使用Fedora-like(Linpus Linux Lite)Linux下編譯php-gtk時遇到了很多麻煩。
我有一個在Ubuntu,Windows和Asus EeePC附帶的Xandros上運行得非常好的應用程序。如何在宏碁Aspire One中安裝php-gtk?
現在我們正在轉向Acer Aspire One,但我在使用Fedora-like(Linpus Linux Lite)Linux下編譯php-gtk時遇到了很多麻煩。
嗨,大家好,我終於得到這個東西的工作的基本工作流程是這樣的:
#!/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的額外請輸入./configure -help
。
[1]
: Dependency problems on Acer Aspire One Linux如果你可以給我們更多的繼續,而不僅僅是麻煩編譯;我們可能會更好地幫助您解決問題。
我設法讓所有的組件需要
安裝你需要添加php_gtk2.so
到動態擴展的/etc/php.ini
extension=php_gtk2.so
來源後對於安裝在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開羅
PHP-GTK需要從SVN,因爲焦油下載。 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測試套件。
是的,我只是在想,我的這個問題的第一個方法是留下一個不錯的how-to頁面。我會再次問一個具體問題,解決並編譯成功後,我會回到這個頁面,並在整個過程中做出不錯的解決方案,而不僅僅是問題。 – levhita 2008-09-18 02:30:03