PHP version issue in VPS server

108 views Asked by At

I have multiple PHP versions installed on my VPS,

  • php7.2
  • php7.4
  • php8.2

I am trying to install the following libraries,

sudo apt-get install -y php8.2-cli php8.2-common php8.2-fpm php8.2-mysql php8.2-zip php8.2-gd php8.2-mbstring php8.2-curl php8.2-xml php8.2-bcmath

Getting the below error while installing the php8.2 packages / libraries,

Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package php8.2-fpm
    E: Couldn't find any package by glob 'php8.2-fpm'
    E: Couldn't find any package by regex 'php8.2-fpm'
    E: Unable to locate package php8.2-zip
    E: Couldn't find any package by glob 'php8.2-zip'
    E: Couldn't find any package by regex 'php8.2-zip'
    E: Unable to locate package php8.2-gd
    E: Couldn't find any package by glob 'php8.2-gd'
    E: Couldn't find any package by regex 'php8.2-gd'
    E: Unable to locate package php8.2-curl
    E: Couldn't find any package by glob 'php8.2-curl'
    E: Couldn't find any package by regex 'php8.2-curl'
    E: Unable to locate package php8.2-bcmath
    E: Couldn't find any package by glob 'php8.2-bcmath'
    E: Couldn't find any package by regex 'php8.2-bcmath'

When I check php version it gives the following output,

 php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/lib/php/20220829/curl (/usr/lib/php/20220829/curl: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/curl.so (/usr/lib/php/20220829/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.2.6 (cli) (built: May 12 2023 06:23:24) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.6, Copyright (c), by Zend Technologies

Note: I also tried to reinstall php8.2 but nothing changes. I also uncommented curl extension from php.ini of 8.2. I tried reinstall 8.2 php because in /usr/lib/php/20220829/curl i cant find curl.so file but nothing happened

0

There are 0 answers