Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Olaniyi Philip Ojeyinka
Olaniyi Philip Ojeyinka

Posted on

     

Installing PHP 8.2/8.3+ on ubuntu 23.04+

you may be getting error simmilar to

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 InReleaseIgn:5 https://ppa.launchpadcontent.net/ondrej/php/ubuntu lunar InReleaseErr: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 InReleaseReading package lists... DoneE: 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… DoneBuilding dependency treeReading state information… DoneE: Unable to locate package php8.2E: Couldn’t find any package by glob ‘php8.2’E: Couldn’t find any package by regex ‘php8.2’”
Enter fullscreen modeExit fullscreen mode

probably after running

add-apt-repository ppa:ondrej/php
Enter fullscreen modeExit fullscreen mode

remove the previous source by running

sudo add-apt-repository --remove ppa:ondrej/phpsudo apt update
Enter fullscreen modeExit fullscreen mode

You will need to edit your repository source file as follows:

sudonano /etc/apt/sources.list
Enter fullscreen modeExit fullscreen mode

and enter

deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main
Enter fullscreen modeExit fullscreen mode

then run

sudoapt update
Enter fullscreen modeExit fullscreen mode

after which you should now be able to install your php version using 8.3 as an example

sudoaptinstallphp8.3
Enter fullscreen modeExit fullscreen mode

if you already have some other php installed, you may need to change to the version using

sudoupdate-alternatives--config php
Enter fullscreen modeExit fullscreen mode

and follow the prompt.

you may also consider installing the following extenstions

sudoaptinstallphp8.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
Enter fullscreen modeExit fullscreen mode

Top comments(2)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
perisicnikola37 profile image
Nikola Perišić
Software Engineer | Technical Writer | 135k+ Reads
  • Email
  • Location
    Podgorica, Montenegro
  • Education
    BSc Information Technologies, University of Donja Gorica
  • Work
    Software Engineer @ Vega IT
  • Joined

Thank you! This actually helped :)

CollapseExpand
 
meetmakwana7396 profile image
Meet Makwana
  • Joined

Thanks mate, This actually worked!

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Just want to create solutions that work!
  • Location
    Lagos, Nigeria
  • Work
    Software Engineer(Backend Focus)
  • Joined

More fromOlaniyi Philip Ojeyinka

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp