>  기사  >  백엔드 개발  >  우분투에 PHP /+ 설치하기

우분투에 PHP /+ 설치하기

PHPz
PHPz원래의
2024-08-20 06:55:31702검색

Installing PHP /+ on ubuntu

다음과 유사한 오류가 발생할 수 있습니다

Hit:1 http://ng.archive.ubuntu.com/ubuntu lunar InRelease                      
Hit:2 http://ng.archive.ubuntu.com/ubuntu lunar-updates InRelease              
Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease                  
Hit:4 http://ng.archive.ubuntu.com/ubuntu lunar-backports InRelease
Ign:5 https://ppa.launchpadcontent.net/ondrej/php/ubuntu lunar InRelease
Err:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu lunar Release
  404  Not Found [IP: 185.125.190.80 443]
Hit:7 http://ng.archive.ubuntu.com/ubuntu lunar-security InRelease
Reading package lists... Done
E: The repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu lunar Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

or 

“Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package php8.2
E: Couldn’t find any package by glob ‘php8.2’
E: Couldn’t find any package by regex ‘php8.2’”

아마 달리기 후에

add-apt-repository ppa:ondrej/php

다음을 실행하여 이전 소스를 제거하세요

sudo add-apt-repository --remove ppa:ondrej/php
sudo apt update

다음과 같이 저장소 소스 파일을 편집해야 합니다.

sudo nano /etc/apt/sources.list

들어가세요

deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main

그런 다음 실행

sudo apt update

이제 예를 들어 8.3을 사용하여 PHP 버전을 설치할 수 있습니다

sudo apt install php8.3

이미 다른 PHP가 설치되어 있는 경우
를 사용하여 해당 버전으로 변경해야 할 수도 있습니다.

sudo update-alternatives --config php

안내를 따르세요.

다음 확장 프로그램 설치를 고려할 수도 있습니다

sudo apt install php8.3-curl php8.3-gd php8.3-intl php8.3-simplexml php8.3-dom php8.3-mysql php8.3-mbstring php8.3-xml php8.3-gd php8.3-curl php8.3-mysqli php8.3-zip

위 내용은 우분투에 PHP /+ 설치하기의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.