CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum/yum.co

Problem with those help pages is is that it doesnt really fix the issue. If you fix curl for custombuild then yum doesnt work, and if you fix it for yum then custombuild doesnt work properly.

Am just wondering why custombuild requires its own curl version when almost every distro (all of those supported have it) has a curl version available, libcurl aswell.
 
Hello,

Note that the fix is in custombuild, at the end of the "./build all" code. If ./build curl is run again, it will overwrite the link.

The main reason for having it in custombuild is because our installer doesn't depend on external servers that we don't control. Meaning if yum or pkg_add disappeared, as long as gcc and related requirements items were on the box already, the install would still work. As well, many people require very old OS's (we don't recommend it, but they use it anyway), and the yum/pkg_add/apt-get systems are long-since EOL, leaving them SOL.

We could add rpms and gz packages onto the files server, which is an option, but managing packages for curl for 30+ OS's would become a nightmare each time a new version of curl came out. With the current method, we upload 1 file, and all OS's use the same thing.

Another option.. probably cleanest, is to leave curl in custombuild, but add a default option like:
Code:
curl=yes
into the options.conf. On CentOS 6, it could be set to no and rpms can be installed from elsewhere (we'd put up rpms on our files server, but likely wouldn't keep them updated for new versions (use yum)... only the source tar.gz would be updated).

John
 
that seems like a good way, because then for centos 6, we could turn it off.

Currently however without custom build curl, the php build fails. Would that be fixed with proper symlinks?
 
Currently however without custom build curl, the php build fails. Would that be fixed with proper symlinks?
Without ./build curl, we'd use something like
Code:
yum install libcurl libcurl-devel
(or whatever they're named), and/or provide the curl rpms on our files.directadmin.com boxes, similar to how we used to do it for gd (before it was built in to php)

John
 
I am running a new server with CentOS 6 64 bit and DirectAdmin. I am not happy with the current fix for yum, because it make it imposible to upgrade curl to newest version. There is a new version in custombuld now, but I can't have the new curl version without breaking yum.

I upgrade to curl 7.22.0 with custombuild:

./build curl
./build php n

Then the new version of curl 7.22.0 is displayed in php info page. However yum is broken. So I fix yum with this fix: http://help.directadmin.com/item.php?id=385 However that fix downgrade curl version, and after doing the yum fix my php info page display old curl version 7.19.7

So it is not possible to have the newest version of curl without breaking yum, if I want yum to work, I must apply the fix and get the old version of curl in php info page. I am not happy about that.
 
Last edited:
Hello,

We've added code in build to resolve the issue.
It's mentioned on the Sept 26, 2011 - Update section:
http://help.directadmin.com/item.php?id=385

Note, with this change, curl will be exclusively updated by yum.
So if you want a new version of curl, you'll need to get it via yum, eg:
Code:
yum update libcurl libcurl-devel
However, I'm not sure how quick they are in getting updates into yum, but at least nothing will break now.

I've also added code to the setup.sh and scripts/custombuild.sh to check and install libcurl-devel automatically, and it will disable curl (curl=no) in the options.conf.

John
 
Just one question,

is the setup.sh be changed on this update (or in general on updates)?

Cause ive it on my repository and would ask if necessary i need to update it often or isnt much important.

Thanks
 
Yes, but really only installs the libcurl-devel package:
Code:
[root@jbmc-software public_html]# diff -u setup.sh.backup.2011.sept26 setup.sh
--- setup.sh.backup.2011.sept26 2011-09-26 17:25:34.000000000 -0600
+++ setup.sh    2011-09-26 17:49:00.000000000 -0600
@@ -713,6 +713,8 @@
 else
        GD=`checkFile $LIB_DIR/libgd.so.1`; #1.8.4
 fi
+CURLDEV=`checkFile /usr/include/curl/curl.h`
+
 E2FS=1;
 E2FS_DEVEL=1;
 if [ -e /etc/fedora-release ]; then
@@ -993,6 +995,28 @@
        addPackage gd $gd
 fi

+if [ "$CURLDEV" -eq 0 ]; then
+       #only applies to centos 6
+       if [ "${FILES_PATH}" = "es_6.0" ] || [ "${FILES_PATH}" = "es_6.0_64" ]; then
+               echo "Installing libcurl-devel..";
+
+               yum -y install libcurl-devel
+
+               if [ ! -s /usr/include/curl/curl.h ]; then
+                       echo "*************************";
+                       echo "* Cannot find /usr/include/curl/curl.h.  Php compile may fail. (yum -y install libcurl-devel)";
+                       echo "* If yum doesn't work, install rpms from your respective OS path (use only 1):";
+                       echo "*   http://files.directadmin.com/services/es_6.0/libcurl-devel-7.19.7-16.el6.i686.rpm";
+                       echo "*   http://files.directadmin.com/services/es_6.0_64/libcurl-7.19.7-16.el6.x86_64.rpm";
+                       echo "*";
+                       echo "* If you can install libcurl-devel quick enough in a 2nd ssh window, the php compile may work.";
+                       echo "*************************";
+                       sleep 5;
+               fi
+       fi
+fi
+
+
 if [ $WEBALIZER -eq 0 ]; then

        WEBALIZER_FILE=/usr/bin/webalizer
The rest of the changes are in scripts/custombuild.sh, which calls ./build set curl no, and the build script itself, to allow the curl option in the options.conf.

John
 
Ok thansk,

ive just added yum install if centos is 6 on my script and also sed on options.conf for change curl=yes to curl=no

Regards
 
Hello,

We've added code in build to resolve the issue.
It's mentioned on the Sept 26, 2011 - Update section:
http://help.directadmin.com/item.php?id=385

Note, with this change, curl will be exclusively updated by yum.
So if you want a new version of curl, you'll need to get it via yum, eg:
Code:
yum update libcurl libcurl-devel
However, I'm not sure how quick they are in getting updates into yum, but at least nothing will break now.

I've also added code to the setup.sh and scripts/custombuild.sh to check and install libcurl-devel automatically, and it will disable curl (curl=no) in the options.conf.

John

Hi John,

I'm sorry to say that, but this workaround is not a solution. Yum needs cURL to have FILE support available, but it's disabled on the compilation time. So, the solution is:
Code:
cd /usr/local/directadmin/custombuild
./build update
perl -pi -e 's#./configure --disable-file#./configure#' build
./build curl

Good luck!
 
That's much simpler ;)

The question is, is the open_basedir bypass in curl resolved?
If it is, then I'll just remove the "--disable-file" option from the curl configure.

I've confirmed that removing it makes yum work, using the latest curl libs.
But we just need to know if we safely remove the block, without generating security issues.

John
 
Thanks, custombuild updated.
--disable-file

has been removed.
I go through the code to have it not set curl=no for CentOS 6.

John
 
Thank you, John and smtalk! I just reverted the changes and added back curl in custombuild on my CentOS 6 server, and it works great! Finally I have the newest curl version and yum is still working! I am so happy for this. Thanks!
 
Back
Top