Trouble using /scripts/makecpphp

hostclick

Member
Jul 13, 2010
5
0
51
Hi All,

We have tried to rebuild cpanel php using the script /scripts/makecpphp. However we are getting the following error

"!! No method to auto repair package system !!!! Please visit
EaError < AllDocumentation < TWiki for help with this error. !!"

Upgrading cpanel (using /scripts/upcp --force) didn't helped.

I have been trying to find a solution. Can anyone help me to fix this issue. Thanks in advance for any help :)
 

Miraenda

Well-Known Member
Jul 28, 2004
243
5
168
Coralville, Iowa USA
cPanel Access Level
Root Administrator
Run yum update and see what happens when you do. If it errors, then please provide the error here on what it shows.

Oftentimes, the reason yum cannot work properly is due to corruption of the rpm database. You can try these steps if that's the issue:

Code:
mv /var/lib/rpm/__db* /root
rpm --rebuilddb
yum clean all
Alternatively, if you are on RedHat Enterprise and using up2date, but the RedHat license has expired, you can switch your system to yum with this file:

Code:
touch /var/cpanel/useyum
This will only work if your system does have yum on it. If it is RedHat and doesn't have yum, you can try to install the components necessary for yum to function using this wiki how-to:

http://wiki.openvz.org/Yum_-_installing

Please ensure to pick the right CentOS version (4 or 5) and right architecture type (32-bit or 64-bit) for your server.

Another issue is sometimes that the repositories aren't properly set (someone has either fooled with them or they've been commented out due to failures in the past). The file is /etc/yum.repos.d/CentOS-Base.repo and would look like the following when it hasn't been tampered with by someone:

Code:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1

#released updates 
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=2
protect=1

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=2
protect=1
If the file does look like this but these repos still aren't working, you can always uncomment the baseurl lines to see if you can connect to those instead. That's what the comment at the top of the file means:

Code:
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
 

hostclick

Member
Jul 13, 2010
5
0
51
Trouble using /scripts/makecpphp

Hi,

Thanks for looking into it.

On running yum update, we get result:

Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
core [1/3]
Cannot find a valid baseurl for repo: core
Error: Cannot find a valid baseurl for repo: core

and after that tried the below:

mv /var/lib/rpm/__db* /root
rpm --rebuilddb
yum clean all

But gets the same error as above.

Thanks
 

Miraenda

Well-Known Member
Jul 28, 2004
243
5
168
Coralville, Iowa USA
cPanel Access Level
Root Administrator
This line means it is the repo issue I mentioned at the end:

Code:
Cannot find a valid baseurl for repo: core
Check /etc/yum.repos.d/CentOS-Base.repo file and compare it to what I pased. If it differs, make a backup of yours and restore it with what I provided.