Cannot install PHP packages in CentOS

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

In CentOS 6.3 (Edit: updated to 6.4) I can't install any PHP (MySQL, and many other) packages.

For example output of yum install php-devel is:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.vit.com.tr
 * extras: mirrors.prometeus.net
 * rpmforge: mirror.nl.leaseweb.net
 * updates: mirrors.prometeus.net
Setting up Install Process
No package php-devel available.
Error: Nothing to do

output of ls /etc/yum.repos.d:

CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo  CentOS-Vault.repo  mirrors-rpmforge  rpmforge.repo

grep -E "name|enabled" /etc/yum.repos.d/*:

/etc/yum.repos.d/CentOS-Base.repo:name=CentOS-$releasever - Base
/etc/yum.repos.d/CentOS-Base.repo:name=CentOS-$releasever - Updates
/etc/yum.repos.d/CentOS-Base.repo:name=CentOS-$releasever - Extras
/etc/yum.repos.d/CentOS-Base.repo:name=CentOS-$releasever - Plus
/etc/yum.repos.d/CentOS-Base.repo:enabled=0
/etc/yum.repos.d/CentOS-Base.repo:name=CentOS-$releasever - Contrib
/etc/yum.repos.d/CentOS-Base.repo:enabled=0
/etc/yum.repos.d/CentOS-Debuginfo.repo:name=CentOS-6 - Debuginfo
/etc/yum.repos.d/CentOS-Debuginfo.repo:enabled=0
/etc/yum.repos.d/CentOS-Media.repo:name=CentOS-$releasever - Media
/etc/yum.repos.d/CentOS-Media.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.0 - Base
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.0 - Updates
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.0 - Extras
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.0 - Contrib
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.0 - CentOSPlus
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.1 - Base
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.1 - Updates
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.1 - Extras
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.1 - Contrib
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.1 - CentOSPlus
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.2 - Base
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.2 - Updates
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.2 - Extras
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.2 - Contrib
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/CentOS-Vault.repo:name=CentOS-6.2 - CentOSPlus
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/rpmforge.repo:name = Red Hat Enterprise $releasever - RPMforge.net - dag
/etc/yum.repos.d/rpmforge.repo:enabled = 1

yum repolist:

repo id                                           repo name                                                                          status
base                                              CentOS-6 - Base                                                                      6,296+85
extras                                            CentOS-6 - Extras                                                                          13
rpmforge                                          Red Hat Enterprise 6 - RPMforge.net - dag                                          11,131+144
updates                                           CentOS-6 - Updates                                                                     890+34

yum list available 'php-*':

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.vit.com.tr
 * extras: mirrors.prometeus.net
 * rpmforge: www.mirrorservice.org
 * updates: mirrors.prometeus.net
Error: No matching Packages to list

This happens for all PHP packages. When I type php- and press tab key there is no auto completion. Any suggestions?

profilepic.png
manpreet 2 years ago

Some software like cpanel disable php in /etc/yum.conf

exclude= php*  mysql*

If your /etc/yum.conf file contains above line simple remove php* from that line After that you can install php :)


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.