更新 Fedora 19 失败,出现 curl 403 错误

更新 Fedora 19 失败,出现 curl 403 错误

我尝试使用 fedup 将 Fedora 18 更新到 19,但 curl 出现错误“请求的 URL 返回错误:403 禁止访问”

我位于防火墙和 http_proxy 环境变量后面。它在其他应用程序中有效。

root@localhost ~]# fedup-cli --network 19 设置存储库... 以下存储库没有可用的升级:sublime2 获取启动映像... .treeinfo | 1.1 kB 00:00

下载失败:无法获取启动映像:curl#22 - “请求的 URL 返回错误:403 禁止访问”

我运行了 curl 并且它有效:

curl -v -o index.html --proxy-any www.bbc.co.uk

* About to connect() to proxy proxy.domain.com port 8080 (#0)
*   Trying XX.XX.XX.XX...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* connected
* Connected to proxy.domain.com (XX.XX.XX.XX) port 8080 (#0)
> GET HTTP://www.bbc.co.uk HTTP/1.1
> User-Agent: curl/7.30.0-DEV
> Host: www.bbc.co.uk
> Accept: */*
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 OK
< Server: Apache
< Etag: "7ac4efdef22e410ac04aa1316a7a6197"
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Date: Fri, 30 Aug 2013 10:22:36 GMT
< X-Cache-Action: HIT
< X-Cache-Hits: 210
< X-Cache-Age: 19
< Cache-Control: private, max-age=0, must-revalidate
< X-LB-NoCache: true
< Vary: X-CDN,X-Requested-With
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< Age: 0
< 
{ [data not shown]
100  120k    0  120k    0     0   450k      0 --:--:-- --:--:-- --:--:--  471k
* Connection #0 to host proxy.domain.com left intact
* Closing connection #0

以下是来自 fedup 的调试文件:

[     0.141] (II) fedup:<module>() /bin/fedup starting at Fri Aug 30 11:17:29 2013
[     0.141] (DD) fedup:setup_downloader() setup_downloader(version=19, repos=[])
[     0.141] (II) fedup.yum:__init__() FedupDownloader(version=19, cachedir=/var/tmp/fedora-upgrade)
[     0.141] (DD) fedup.yum:__init__() prerepoconf.cache=0
[     0.142] (II) fedup.yum:setup_repos() checking repos
[     0.195] (DD) fedup.yum:_getConfig() conf.cache=0
[     1.597] (II) fedup.yum:setup_repos() repo default-installrepo seems OK
[     2.084] (II) fedup.yum:setup_repos() repo fedora seems OK
[    15.506] (II) fedup.yum:setup_repos() repo updates seems OK
[    15.506] (DD) fedup.yum:setup_repos() repos.cache=0
[    15.507] (DD) fedup.yum:treeinfo() fetching .treeinfo from repo 'default-installrepo'
[    16.870] (DD) fedup.yum:treeinfo() .treeinfo saved at /var/tmp/fedora-upgrade/.treeinfo
[    16.871] (DD) fedup.yum:grab_and_check() grabbing x86_64 kernel
[    16.871] (II) fedup.yum:grab_and_check() downloading images/pxeboot/vmlinuz to /boot/vmlinuz-fedup
[    17.217] (II) fedup:message() Downloading failed: couldn't get boot images: curl#22 - "The requested URL returned error: 403 Forbidden"
[    17.217] (DD) fedup:<module>() Exception:
Traceback (most recent call last):
  File "/bin/fedup", line 181, in <module>
    main(args)
  File "/bin/fedup", line 120, in main
    kernel, initrd = f.download_boot_images() # TODO: force arch?
  File "/usr/lib/python2.7/site-packages/fedup/download.py", line 282, in download_boot_images
    raise YumBaseError(_("couldn't get boot images: %s") % err)
YumBaseError: couldn't get boot images: curl#22 - "The requested URL returned error: 403 Forbidden"
[    17.219] (II) fedup:<module>() /bin/fedup exiting at Fri Aug 30 11:17:46 2013
[     0.142] (II) fedup:<module>() /bin/fedup starting at Fri Aug 30 11:18:44 2013
[     0.143] (DD) fedup:setup_downloader() setup_downloader(version=19, repos=[])
[     0.143] (II) fedup.yum:__init__() FedupDownloader(version=19, cachedir=/var/tmp/fedora-upgrade)
[     0.143] (DD) fedup.yum:__init__() prerepoconf.cache=0
[     0.144] (II) fedup.yum:setup_repos() checking repos
[     0.180] (DD) fedup.yum:_getConfig() conf.cache=0
[     0.224] (II) fedup.yum:setup_repos() repo default-installrepo seems OK
[     0.227] (II) fedup.yum:setup_repos() repo fedora seems OK
[     0.230] (II) fedup.yum:setup_repos() repo updates seems OK
[     0.230] (DD) fedup.yum:setup_repos() repos.cache=0
[     0.231] (DD) fedup.yum:treeinfo() fetching .treeinfo from repo 'default-installrepo'
[     0.335] (DD) fedup.yum:treeinfo() .treeinfo saved at /var/tmp/fedora-upgrade/.treeinfo
[     0.336] (DD) fedup.yum:grab_and_check() grabbing x86_64 kernel
[     0.336] (II) fedup.yum:grab_and_check() downloading images/pxeboot/vmlinuz to /boot/vmlinuz-fedup
[     0.373] (II) fedup:message() Downloading failed: couldn't get boot images: curl#22 - "The requested URL returned error: 403 Forbidden"
[     0.373] (DD) fedup:<module>() Exception:
Traceback (most recent call last):
  File "/bin/fedup", line 181, in <module>
    main(args)
  File "/bin/fedup", line 120, in main
    kernel, initrd = f.download_boot_images() # TODO: force arch?
  File "/usr/lib/python2.7/site-packages/fedup/download.py", line 282, in download_boot_images
    raise YumBaseError(_("couldn't get boot images: %s") % err)
YumBaseError: couldn't get boot images: curl#22 - "The requested URL returned error: 403 Forbidden"
[     0.374] (II) fedup:<module>() /bin/fedup exiting at Fri Aug 30 11:18:44 2013
[     0.146] (II) fedup:<module>() /bin/fedup starting at Fri Aug 30 11:19:14 2013
[     0.147] (DD) fedup:setup_downloader() setup_downloader(version=19, repos=[])
[     0.147] (II) fedup.yum:__init__() FedupDownloader(version=19, cachedir=/var/tmp/fedora-upgrade)
[     0.148] (DD) fedup.yum:__init__() prerepoconf.cache=0
[     0.148] (II) fedup.yum:setup_repos() checking repos
[     0.184] (DD) fedup.yum:_getConfig() conf.cache=0
[     0.228] (II) fedup.yum:setup_repos() repo default-installrepo seems OK
[     0.231] (II) fedup.yum:setup_repos() repo fedora seems OK
[     0.234] (II) fedup.yum:setup_repos() repo updates seems OK
[     0.234] (DD) fedup.yum:setup_repos() repos.cache=0
[     0.235] (DD) fedup.yum:treeinfo() fetching .treeinfo from repo 'default-installrepo'
[     0.317] (DD) fedup.yum:treeinfo() .treeinfo saved at /var/tmp/fedora-upgrade/.treeinfo
[     0.317] (DD) fedup.yum:grab_and_check() grabbing x86_64 kernel
[     0.318] (II) fedup.yum:grab_and_check() downloading images/pxeboot/vmlinuz to /boot/vmlinuz-fedup
[     0.341] (II) fedup:message() Downloading failed: couldn't get boot images: curl#22 - "The requested URL returned error: 403 Forbidden"
[     0.342] (DD) fedup:<module>() Exception:
Traceback (most recent call last):
  File "/bin/fedup", line 181, in <module>
    main(args)
  File "/bin/fedup", line 120, in main
    kernel, initrd = f.download_boot_images() # TODO: force arch?
  File "/usr/lib/python2.7/site-packages/fedup/download.py", line 282, in download_boot_images
    raise YumBaseError(_("couldn't get boot images: %s") % err)
YumBaseError: couldn't get boot images: curl#22 - "The requested URL returned error: 403 Forbidden"
[     0.343] (II) fedup:<module>() /bin/fedup exiting at Fri Aug 30 11:19:14 2013

我想知道我是否应该自己构建 fedup?

我最终从 ISO 文件进行了更新:

fedup-cli --iso Fedora-19-x86_64-DVD.iso

更多信息请点击此处https://ask.fedoraproject.org/question/7030/upgrade-fedora-17-to-18-with-fedora-18-install-dvd/

答案1

Yum 不支持http_proxy环境变量。您需要在配置文件中设置proxy(和proxy_username/ proxy_password) /etc/yum.conf

答案2

我最终从 ISO 文件进行了更新:

fedup-cli --iso Fedora-19-x86_64-DVD.iso

更多信息请点击此处https://ask.fedoraproject.org/question/7030/upgrade-fedora-17-to-18-with-fedora-18-install-dvd/

相关内容