如何在 libcurl 中启用 rsync?

ste*_*red 7 ftp arch-linux pacman rsync curl

我在拱门。当pacman试图从一个下载包ftp服务器,它失败,出现错误信息

libcurl 中不支持或禁用协议 rsync

这已经困扰我一段时间了,但我不记得我做了什么导致它(Pacman 只是从http服务器下载,所以我已经能够忽略它)。我已经安装了rsynclibcurl,而且它们以前显然一起玩得很好。我找不到任何libcurlcurl配置文件,也没有rsyncman页面中提及。我该如何去启用rsync

lor*_*nix 8

libcurl 不支持 rsync 协议。

来自 libcurl常见问题解答第 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://example.com" or as in the less evident case if you prefix
   the protocol part with a space as in " http://example.com/".
Run Code Online (Sandbox Code Playgroud)

libcurl 根本不知道 rsync 协议,甚至连提示都不知道。但是,由于它旨在从 URL 中的指示符“猜测”协议,因此尝试使用rsync://blah.blah会给您带来您看到的错误,因为它猜测您的意思是“rsync”,但它不知道那个,所以它返回错误。

如果你尝试过lornix://blah.blah,它会给你同样的错误,我怀疑我也是一个文件传输协议。(如果我是,请告诉我!)

Libcurl 确实支持一组令人印象深刻的协议,但 rsync 不是其中之一。