安装软件编译问题
- 在启动 MongoDB 时报
/lib64/libc.so.6: version GLIBC_2.14 not found
:
1
2
3
4
5
6
7
8
9
10
11
12
| // 升级 glibc 版本到 2.17
# wget http://ftp.gnu.org/gnu/glibc/glibc-2.17.tar.gz
# tar xf glibc-2.14.tar.gz
# cd glibc-2.14
# mkdir build
# ../configure --prefix=/usr --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
# make -j 8
# make install
// 查看版本
# ldd --version
# strings /lib64/libc.so.6 | grep GLIBC_
|
Ubuntu 23.04 安装不了 PHP 8.2
PHP 8.2 on Ubuntu 22.04
在 Ubuntu 22.04 上安装没什么问题,纯粹记录一下。
1
2
3
4
5
6
7
8
9
10
| sudo apt update && sudo apt -y upgrade
sudo apt autoremove
[ -f /var/run/reboot-required ] && sudo reboot -f
sudo apt install -y lsb-release gnupg2 ca-certificates apt-transport-https software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2 -y
php --version
sudo apt install php8.2-{common,bcmath,fpm,xml,mysql,zip,intl,ldap,gd,cli,bz2,curl,mbstring,pgsql,opcache,soap,cgi} -y
php -m
|
PHP 8.2 on Ubuntu 23.04
但是在 Ubuntu 23.04 上安装 PHP 8.2 就出些问题,原因是 ppa:ondrej/php
还未对 Ubuntu 23.04 做对应的源,所以属于 临时修改,以解决安装问题。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| sudo apt update && sudo apt -y upgrade
sudo apt autoremove
[ -f /var/run/reboot-required ] && sudo reboot -f
sudo apt install -y lsb-release gnupg2 ca-certificates apt-transport-https software-properties-common
sudo add-apt-repository ppa:ondrej/php
# change lunar to jammy
vim /etc/apt/sources.list.d/ondrej-ubuntu-php-lunar.list
deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main
# 如果你需要 intl 扩展,可以从 jammy 仓库下载并手动安装 libicu70_70.1-2_amd64.deb。它没有任何依赖项。
touch /etc/apt/preferences.d/ondrejphp
vim /etc/apt/preferences.d/ondrejphp
Package: libgd3
Pin: release n=lunar
Pin-Priority: 900
sudo apt update
sudo apt install php8.2 -y
php --version
sudo apt install php8.2-{common,bcmath,fpm,xml,mysql,zip,intl,ldap,gd,cli,bz2,curl,mbstring,pgsql,opcache,soap,cgi} -y
php -m
|