How do I enable rsync in libcurl?

I’m on Arch. When pacman tries to download a package from an ftp server, It fails with the error message

Protocol rsync not supported or disabled in libcurl

This has been bugging me for a little while now, but I can’t remember what I did to cause it (Pacman just downloads from an http server instead, so I’ve been able to ignore it). I have both rsync and libcurl installed, and they apparently played well together before. I can’t find any libcurl or curl config files and found no mention of rsync in the man page. How can I go about enabling rsync?

Asked By: stewSquared


libcurl does not support the rsync protocol.

From the libcurl FAQ: Section 3.21

   3.21 Protocol xxx not supported or disabled in libcurl

   When passing on a URL to curl to use, it may respond that the particular
   protocol is not supported or disabled. The particular way this error message
   is phrased is because curl doesn't make a distinction internally of whether
   a particular protocol is not supported (i.e. never got any code added that
   knows how to speak that protocol) or if it was explicitly disabled. curl can
   be built to only support a given set of protocols, and the rest would then
   be disabled or not supported.

   Note that this error will also occur if you pass a wrongly spelled protocol
   part as in "htpt://" or as in the less evident case if you prefix
   the protocol part with a space as in "".

libcurl doesn’t know the rsync protocol at all, not even a hint. BUT, since it was designed to ‘guess’ the protocol from the designator in a URL, trying to use rsync://blah.blah will give you the error you see, since it guesses you meant ‘rsync’, but it doesn’t know that one, so it returns the error.

It’ll give you the same error if you tried lornix://blah.blah, I doubt I’m a file transfer protocol either. (If I am, please let me know!)

Libcurl does support an impressive set of protocols, but rsync isn’t one of them.

Answered By: lornix

Additional notes

Even if rsync is set to XferCommand in pacman.conf, it may not be possible to update the packages.

This is when the rsync server does not allow access to files with the *.db extension.
In some cases, the rsync command can retrieve the core.db.tar.gz file, but not the core.db file.
In this case, you should choose https or http.

Also, the mirror server update script will often not meet your expectations even if you sort by RATE if you do not specify the region(country).


1.For mirrorlist, choose https or http protcol.

2.The rsync server operator should configure the settings about the *.db file extension.

3.If you want to update the mirrorlist automatically with a script, specify the region,country, and protcol.

at all.

Answered By: epsilon phoenix
Categories: Answers Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.