gpt4 book ai didi

php - 如何在 Raspbian wheezy 上安装 PHP 5.6?

转载 作者:可可西里 更新时间:2023-11-01 12:29:38 25 4
gpt4 key购买 nike

我想知道如何在我的树莓派上安装 PHP 5.6.x。目前已安装 5.4.41 版,由于新规范,我想升级到 5.6.10。我看过this tutorial但是控制台的输出告诉我出了点问题。

pi@raspberry:~$ sudo apt-get update
Hit http://packages.dotdeb.org wheezy-php56 Release.gpg
Hit http://archive.raspberrypi.org wheezy Release.gpg
Get:1 http://mirrordirector.raspbian.org wheezy Release.gpg [490 B]
Hit http://raspberrypi.collabora.com wheezy Release.gpg
Hit http://packages.dotdeb.org wheezy-php56 Release
Get:2 http://mirrordirector.raspbian.org wheezy Release [14,4 kB]
Hit http://raspberrypi.collabora.com wheezy Release
Hit http://archive.raspberrypi.org wheezy Release
Hit http://packages.dotdeb.org wheezy-php56/all Sources
Hit http://raspberrypi.collabora.com wheezy/rpi armhf Packages
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Get:3 http://mirrordirector.raspbian.org wheezy/main armhf Packages [6.904 kB]
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en_US
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en
Ign http://archive.raspberrypi.org wheezy/main Translation-en_US
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Get:4 http://mirrordirector.raspbian.org wheezy/contrib armhf Packages [23,6 kB]
Get:5 http://mirrordirector.raspbian.org wheezy/non-free armhf Packages [49,3 kB]
Get:6 http://mirrordirector.raspbian.org wheezy/rpi armhf Packages [592 B]
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_US
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_US
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_US
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_US
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Fetched 6.992 kB in 21s (329 kB/s)
W: Failed to fetch http://packages.dotdeb.org/dists/wheezy-php56/Release Unable to find expected entry 'all/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

这里有什么问题?

编辑:我真的在这里得到了反对票吗?为了提问?

最佳答案

我遇到了同样的问题,我是这样解决的:

# Get the PHP source
# You can find the latest version number on the PHP download page: http://php.net/downloads.php
# Change `nl1` to your nearest mirror. Find the mirror list here: http://php.net/mirrors.php.
wget http://nl1.php.net/distributions/php-5.6.13.tar.bz2

# Unpack
tar -xvjf php-5.6.13.tar.bz2

cd php-5.6.13

sudo apt-get update
sudo apt-get install libxml2-dev
./configure

# If on the Raspberry Pi 2
make -j4
# Otherwise
make

sudo make install

# Reboot to make sure changes are effective
sudo reboot

# Check PHP version
php -v

关于php - 如何在 Raspbian wheezy 上安装 PHP 5.6?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31280912/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com