我想改变
http://download.opensuse.org/tumbleweed/repo/oss/
到
https://download.opensuse.org/tumbleweed/repo/oss/
在 yast -> 软件存储库 -> 编辑 -> 编辑存储库的部分 -> "x" https(在它是纯 http 之前),但它只是给我错误消息:
Download (curl) error for 'https://download.opensuse.org/update/tumbleweed/repo/repoindex.xml':
Error code: Bad URL
Error message: Protocol "http" not supported or disabled in libcurl
但如果我手动尝试,http 和 https 都会失败:
linux-4tur:~ # curl https://download.opensuse.org/update/tumbleweed/repo/repoindex.xml
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http://download.opensuse.org/repositories/openSUSE:/Factory:/Update/standard/repo/repoindex.xml">here</a>.</p>
<hr>
<address>Apache/2.2.12 (Linux/SUSE) Server at download.opensuse.org Port 443</address>
</body></html>
linux-4tur:~ # curl http://download.opensuse.org/update/tumbleweed/repo/repoindex.xml
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http://download.opensuse.org/repositories/openSUSE:/Factory:/Update/standard/repo/repoindex.xml">here</a>.</p>
<hr>
<address>Apache/2.2.12 (Linux/SUSE) Server at download.opensuse.org Port 80</address>
</body></html>
linux-4tur:~ #
答案1
您可以使用文本编辑器编辑*.repo
下面的文本文件,而不是使用 yast 。/etc/zypp/repos.d/
您可以通过测试
$ zypper ref
顺便说一句,用于curl -L ...
跟踪重定向。