Skip to main content

Errors updating a new installation

Comments

11 comments

  • cPRex Jurassic Moderator

    Hey there!  I'm wondering if your repository file somehow got the wrong information.  Here's what I see on a test machine inside the repository file at /etc/yum.repos.d/cpanel-plugins.repo:

    [cpanel-plugins]
    name=cPanel Plugins project
    mirrorlist=http://httpupdate.cpanel.net/cpanel-plugins-$os_name_prefix$cp_centos_major_version-$basearch-mirrorlist
    gpgcheck=1
    gpgkey=https://securedownloads.cpanel.net/cPanelPublicPkgKey.asc
    enabled=1
    cost=50

    Can you check that file on your system and ensure it is the same?

    0
  • Jose Tapajos

    Same error here. Just updated to Almalinux and when i tried "yum update" the 404 error apears.

    Error: Failed to download metadata for repo 'cpanel-plugins': Cannot prepare internal mirrorlist: Status code: 404 for http://httpupdate.cpanel.net/cpanel-plugins-$os_name_prefix8-x86_64-mirrorlist (IP: 89.222.122.161)

    cPRex, the repo file is exacly as you posted.

    0
  • Bruno Costa

    I had the same issue and if you look at the error, DNF doesn't know what the variable 'os_name_prefix' is because it is missing from the /etc/dnf/vars folder:

    cat: /etc/dnf/vars/os_name_prefix: No such file or directory

    While on a 'good' server we have this:

    [root@server ~]# cat /etc/dnf/vars/os_name_prefix
    c[root@server ~]#

    I added this manually and it fixed the issue however I'm wondering why the file is not created.

    1
  • Jose Tapajos

    [root@server ~]# cat /etc/dnf/vars/os_name_prefix
    c[root@server ~]#

    Thanks Bruno. The "os_name_prefix" file was missing here too. Created the file and now everything is working.

    0
  • cPRex Jurassic Moderator

    That's interesting - cPanel wouldn't have any control over that particular file so I'm wondering if there is something up with the images you all were using.  I don't have any other explanation for this that makes sense.

    0
  • Curious Too

    My issue happened with an Alma Linux 9 installation on a Hivelocity VPS. There were lots of problems and I ended up reloading the VPS with Alma Linux 8.

    0
  • Orlando Marton

    Hello,

    AlmaLinux release 8.10 (Cerulean Leopard) is the same for me.

    yum update
    cPanel Plugins project                                                                                                                             79  B/s | 146  B     00:01
    Errors during downloading metadata for repository 'cpanel-plugins':
      - Status code: 404 for http://httpupdate.cpanel.net/cpanel-plugins-8-x86_64-mirrorlist (IP: 89.222.122.163)
    Error: Failed to download metadata for repo 'cpanel-plugins': Cannot prepare internal mirrorlist: Status code: 404 for http://httpupdate.cpanel.net/cpanel-plugins-8-x86_64-mirrorlist (IP: 89.222.122.163)

    cat: /etc/dnf/vars/os_name_prefix: No such file or directory

    After manually adding it is fine.

    0
  • Bruno Costa

    So I have two flows to create server where one is based on an image of a Alma8 server with cPanel already installed and the other is just the OS image and installing cPanel with the install script. I only have this issue on the first method, since the image itself doesn't have this file present. I assume this has been a recent change (cPRex can confirm) from cPanel so pre-built cPanel images have to be remade or always install cPanel using their script.

    0
  • cPRex Jurassic Moderator

    It's always possible that pre-built images with cPanel will contain slightly out of date things.  It's important to note that we likely aren't the ones providing those images so we don't have any control over that experience.

    0
  • cPRex Jurassic Moderator

    ^^^what Bruno Costa said.  We were able to identify this issue and there is a workaround posted in that article, which is just running this one command:

    /usr/local/cpanel/3rdparty/bin/perl -MCpanel::Yum::Vars -e 'Cpanel::Yum::Vars::install()'
    0

Please sign in to leave a comment.