Page 1 of 1

0-yum installation failing

Posted: Fri Jul 29, 2011 4:54 am
by TSCAdmin
Dear support,

0-yum script is failing after the rpms have been updated with the following error message:
Enabling RPMForge repo...
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
error: File not found by glob: rpmforge-release*.rpm
rm: cannot remove `rpmforge-release*.rpm': No such file or directory
ERROR: rpmforge-release RPM was not installed - exiting.
When I checked the script it seems that the URL for rpmforge-release is wrong, rpmrepo.org doesn't seem to exist.
0-yum.PNG
Could you please help with this? Thanks

Re: 0-yum installation failing

Posted: Fri Jul 29, 2011 12:43 pm
by nscott
Thats from the 2009 release, which is still posted, but is deprecated.

To fix this replace

Code: Select all

rpm -q rpmforge-release > /dev/null 2>&1
ret=$?
if [ $ret -ne 0 ]; then

        echo "Enabling RPMForge repo..."
        cd /tmp
        if [ -f rpmforge-release.html ]; then
                rm rpmforge-release.html
        fi
        if [ -f rpmforge-release*.rpm ]; then
                rm rpmforge-release*.rpm
        fi
        wget -c -q -O rpmforge-release.html http://rpmrepo.org/RPMforge/Using
        LINE=$(grep \<pre\> rpmforge-release.html | sed 's/.*<pre>wget\ \(http.*rpm\)/\1/')
        URL=$(echo $LINE | sed "s/\$dist/$dist/" | sed "s/\$arch/$basearch/")
        wget $URL
        rpm -Uvh rpmforge-release*.rpm
        rm rpmforge-release.html
        rm rpmforge-release*.rpm
fi

Code: Select all

rpm -q rpmforge-release > /dev/null 2>&1
ret=$?
if [ $ret -ne 0 ]; then

        echo "Enabling RPMForge repo..."
        cd /tmp
        if [ -f rpmforge-release.html ]; then
                rm rpmforge-release.html
        fi
        if [ -f rpmforge-release*.rpm ]; then
                rm rpmforge-release*.rpm
        fi
        URL=$(curl -s http://repoforge.org/use/ | grep -o "http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-[0-9.-]*.$dist.rf.$basearch.rpm")
        wget "$URL"
        rpm -Uvh rpmforge-release*.rpm
        rm rpmforge-release*.rpm
        yum check-update
fi
That should allow the installer to install the RPMForge repo. I checked to make sure the EPEL repo would install and that looks fine.

Re: 0-yum installation failing

Posted: Mon Aug 01, 2011 7:46 am
by TSCAdmin
nscott wrote:Thats from the 2009 release, which is still posted, but is deprecated.
now that's really strange. the scripts were working great until a month back.

just out of curiosity - do you plan to fix it in the nagios 2009 package? because i downloaded it once again and it seems it still contains the lines that i reported to be incorrect.

Re: 0-yum installation failing

Posted: Mon Aug 01, 2011 9:09 am
by agriffin
We do periodically make bugfixes to Nagios XI 2009, but I can't guarantee it will be in any specific timeframe.

Re: 0-yum installation failing

Posted: Mon Aug 01, 2011 9:16 am
by nscott
I'm currently uploading a fixed 2009 package with a fixed RPMForge install script.