0

I have a Centos 7.9 with PHP 7.4.33 pre installed. followed this command steps for upgrading the php version to 8.1:

sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm sudo yum install -y yum-utils sudo yum-config-manager --enable remi-php81 sudo yum-config-manager --disable remi-php74 sudo yum install -y php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd 

but at the end it returns:

No package php available. No package php-common available. No package php-opcache available. No package php-mcrypt available. No package php-cli available. No package php-gd available. No package php-curl available. No package php-mysqlnd available. Error: Nothing to do 

retried with this:

yum --disablerepo="*" --enablerepo="remi-php81" list available 

got same return. also tried:

sudo yum clean all sudo yum update 

and:

sudo yum install -y php81 php81-common php81-opcache php81-cli php81-gd php81-curl php81-mysqlnd 

Same... .

what should i do?


Update: I have a Cpanel WHM on this server. in php version manager, i was able to change the version to 8. But what I want is 8.1 and it is not among the options.

1
  • 1
    Check "exclude" directive in yum configuration. Also note that centos 7 is old, terribly old, and close to its end of life in a few months. Commented Apr 4, 2023 at 5:33

1 Answer 1

0

You should update the packages, not install them:

yum update php\* 
3
  • 2
    If a package is already installed when you run yum install you should get a message Package foo-1.2.3 is already installed. No package indicates that there is another problem. Commented Apr 3, 2023 at 18:03
  • @doneal24, correct. But seems like (for me) the OP try to install packages which do not exist (in repo) Commented Apr 3, 2023 at 18:05
  • tried that, there is no update! Commented Apr 3, 2023 at 20:34

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.