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

发布于 2024-07-06 10:58:45 字数 246 浏览 15 评论 0原文

我有一个应用程序在 Ubuntu、Windows 和 Asus EeePC 附带的 Xandros 中运行得很好。

现在我们正在转向 Acer Aspire One 但我在制作 php 时遇到了很多麻烦-gtk 在自带的类 Fedora (Linpus Linux Lite) Linux 下编译。

I have an application that works pretty well in Ubuntu, Windows and the Xandros that come with the Asus EeePC.

Now we are moving to the Acer Aspire One but I'm having a lot of trouble making php-gtk to compile under the Fedora-like (Linpus Linux Lite) Linux that come with it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

辞旧 2024-07-13 10:58:45

我设法在 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"

因此,请继续我离开的地方,让 Phoronix 测试套件在 Fedora 上运行。

I managed to get all components needed for Phoronix test suite installed on Fedora but still have one issue.

# 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

You need two packages that aren't in Fedora, php-gtk, but php-gtk also has it's dependency - pecl-cairo

php-gtk needs to be downloaded from svn because tar.gz version is really old and doesn't work with php 5.3

Here is how I got all components built.

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"

So please take where I left to get Phoronix test suite running on Fedora.

青春有你 2024-07-13 10:58:45

大家好,我终于让这个东西工作了,基本工作流程是这样的:

#!/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]: < a href="http://macles.blogspot.com/2008/08/dependency-problems-on-acer-aspire-one.html" rel="nofollow noreferrer">Acer Aspire One Linux 上的依赖性问题

Hi Guys well I finally got this thing to work the basic workflow was this:

#!/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

If you want to add more libraries like gtk-extra please type ./configure -help before making it to see the different options available.

After installing you'll need to add php_gtk2.so to the Dynamic Extensions of /etc/php.ini

extension=php_gtk2.so

Sources:

[1]: Dependency problems on Acer Aspire One Linux

笑忘罢 2024-07-13 10:58:45

如果你能给我们更多的帮助,而不仅仅是编译时的麻烦; 我们也许能够更好地帮助您解决问题。

If you could give us more to go on than just trouble making it compile; we might be better able to help you with your issues.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文