[3rd-Party Apps] 源码安装PHP8 Resolved
Tofloor
poster avatar
158******53
deepin
2022-07-18 03:19
Author
##源码安装PHP8失败记录

./configure
--prefix=/usr/local/php8
--exec-prefix=/usr/local/php8
--bindir=/usr/local/php8/bin
--sbindir=/usr/local/php8/sbin
--includedir=/usr/local/php8/include
--libdir=/usr/local/php8/lib/php
--mandir=/usr/local/php8/php/man
--with-mcrypt=/usr/include
--enable-mysqlnd
--with-mysqli
--with-pdo-mysql
--enable-fpm
--with-fpm-user=www
--with-fpm-group=www
--with-gd
--with-iconv
--with-zlib
--enable-xml
--enable-shmop
--enable-sysvsem
--enable-inline-optimization
--enable-mbregex
--enable-mbstring
--enable-ftp
--enable-gd-native-ttf
--with-openssl
--enable-pcntl
--enable-sockets
--with-xmlrpc
--enable-zip
--enable-soap
--without-pear
--with-gettext
--enable-session
--with-curl
--with-jpeg-dir
--with-freetype-dir
--enable-opcache

checking for sqlite3 >= 3.7.7... no
configure: error: Package requirements (sqlite3 >= 3.7.7) were not met:

No package 'sqlite3' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SQLITE_CFLAGS
and SQLITE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

#上面提示 (sqlite3 >= 3.7.7) 其实是满足的
我的版本是:
root@buffer-PC:/opt/src/php8# sqlite3 version
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
sqlite>

#猜测是PHP默认sqlite3的路径,和depin安装路径不一样。
#1.是否可以指定安装sqlite3安装路径
#2.其他安装方式 apt install php

#我先放弃源码安装,有时间再研究
#执行命令安装吧 截止(2022/7/17)只有PHP7.3
#apt install php


Reply Favorite View the author
All Replies
158******53
deepin
2022-07-18 05:03
#1
#源码安装PHP8,整理了一下
#依赖安装,执行下面命令
apt install -y \
libcurl4-openssl-dev\
install libsqlite3-dev\
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
zlib1g-dev \
libxml2-dev \
libzip-dev \
graphviz \


#PHP编译检查
./configure \
--prefix=/opt/apps/php8 \
--with-mcrypt=/usr/include \
--enable-mysqlnd \
--with-mysqli \
--with-pdo-mysql \
--enable-fpm \
--with-fpm-user=buffer\
--with-fpm-group=buffer \
--with-gd \
--with-iconv \
--with-zlib \
--enable-xml \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--enable-mbregex \
--enable-mbstring \
--enable-ftp \
--enable-gd-native-ttf \
--with-openssl \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--without-pear \
--with-gettext \
--enable-session \
--with-curl \
--with-jpeg-dir \
--enable-opcache

#出现错误
checking for oniguruma... no
configure: error: Package requirements (oniguruma) were not met:

No package 'oniguruma' found

#解决错误
wget https://github.com/kkos/oniguruma/releases/download/v6.9.8/onig-6.9.8.tar.gz

./configure make&&make install

#再执行PHP安装成功编辑

#make && make install


Reply View the author
charm
deepin
2022-07-18 06:10
#2

依賴很麻煩,不過還好我在wsl的deepin子系统里搞定了

Reply View the author
BG7ZAG
deepin
2022-07-18 17:37
#3
charm

依賴很麻煩,不過還好我在wsl的deepin子系统里搞定了

wsl可以装deepin吗?

Reply View the author
dmyz3214382
deepin
2022-07-18 19:12
#4
BG7ZAG

wsl可以装deepin吗?

Reply View the author
Comments
Jason
2022-07-18 23:02
感谢分享
charm
deepin
2022-07-18 19:21
#5
BG7ZAG

wsl可以装deepin吗?

可以,github有

Reply View the author
lucenarenato
deepin
2024-11-02 02:09
#6

Install PHP8, 8.2, 8.3 no Deepin 23

  • https://github.com/lucenarenato/scriptDeepin23InstallPHP/blob/master/README.md
# deepin-scripts

## RUN

```sh
sudo chmod -R 777 deepin-scripts-php8.2-installer.sh
sudo chmod -R 777 version_php.sh
sudo ./deepin-scripts-php8.2-installer.sh
sudo ./version_php.sh

Outras informacoes

  • https://packages.debian.org/bullseye/amd64/libffi7/download
sudo apt policy php
sudo apt install libdav1d4
sudo apt install libdav1d5
sudo apt --fix-broken install
sudo apt autoremove
sudo apt install libffi8
sudo apt install php8.2-fpm
wget http://ftp.br.debian.org/debian/pool/main/libf/libffi/libffi7_3.3-6_amd64.deb
sudo dpkg -i libffi7_3.3-6_amd64.deb
sudo apt install -f

Linux renato-HP 6.9.6-amd64-desktop-rolling #23.01.01.02 SMP PREEMPT_DYNAMIC Tue Jul 23 12:20:02 CST 2024 x86_64 GNU/Linux

cat /etc/os-version
[Version]
SystemName=Deepin
SystemName[zh_CN]=深度操作系统
ProductType=Desktop
ProductType[zh_CN]=桌面
EditionName=Community
EditionName[en_US]=Community
EditionName[zh_CN]=社区版
MajorVersion=23
MinorVersion=23
OsBuild=31038.101

## sources Brasil da USP e UFPR
cat /etc/apt/sources.list

## Generated by deepin-installer
deb https://community-packages.deepin.com/beige/ beige main commercial community
#deb-src https://community-packages.deepin.com/beige/ beige main commercial community

deb https://deepin.c3sl.ufpr.br/deepin apricot main contrib non-free
deb http://sft.if.usp.br/deepin apricot main contrib non-free
# deb http://mirror.unesp.br/deepin apricot main contrib non-free


Reply View the author