Hong方谬 2022-02-20 14:53 采纳率: 42.9%
浏览 202
已结题

vcpkg无法下载安装包

问题遇到的现象和发生背景

我想用vcpkg安装gmp这个包,然后直接vcpkg install gmp的话,老是失败。
然后我就想采用知乎上搜到的方案,直接去手动下载,然后将压缩包复制到vcpkg/downloads中去,
再执行vcpkg install gmp,最后发现还是不行

问题相关代码,请勿粘贴截图

(1)先用vcpkg install gmp找到下载地址:

PS C:\src\vcpkg> vcpkg install gmp
Computing installation plan...
The following packages will be built and installed:
    gmp[core]:x64-windows -> 6.2.1#7
  * vs-yasm[core]:x64-windows -> 0.5.0#1
  * yasm-tool[core]:x64-windows -> 1.3.0#1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
-- Automatically setting HTTP(S)_PROXY environment variables to 127.0.0.1:31181
Restored 0 packages from C:\Users\Hong\AppData\Local\vcpkg\archives in 507.6 us. Use --debug to see more details.
Starting package 1/3: vs-yasm:x64-windows
Building package vs-yasm[core]:x64-windows...
-- Downloading https://github.com/ShiftMediaProject/VSYASM/archive/deb50d9f18e8461538468339d508cdf240e64897.tar.gz -> ShiftMediaProject-VSYASM-deb50d9f18e8461538468339d508cdf240e64897.tar.gz...

(2)找到github下载地址如下:
https://github.com/ShiftMediaProject/VSYASM/archive/deb50d9f18e8461538468339d508cdf240e64897.tar.gz
(3)下载好后就把压缩包复制到了vcpkg/downloads目录下。
(4)再次执行vcpkg install gmp,发现还是失败。

运行结果及报错内容

(5)报错内容如下,与复制前一样的报错内容,下面是接着后面的

-- Downloading https://github.com/ShiftMediaProject/VSYASM/archive/deb50d9f18e8461538468339d508cdf240e64897.tar.gz -> ShiftMediaProject-VSYASM-deb50d9f18e8461538468339d508cdf240e64897.tar.gz...
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' = off
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Downloading https://github.com/ShiftMediaProject/VSYASM/archive/deb50d9f18e8461538468339d508cdf240e64897.tar.gz
[DEBUG] Download failed -- retrying after 1000 ms.
[DEBUG] Download failed -- retrying after 2000 ms.
[DEBUG] Download failed -- retrying after 4000 ms.
Error: Failed to download from mirror set:
https://github.com/ShiftMediaProject/VSYASM/archive/deb50d9f18e8461538468339d508cdf240e64897.tar.gz: WinHttpSendRequest() failed: 12175
https://github.com/ShiftMediaProject/VSYASM/archive/deb50d9f18e8461538468339d508cdf240e64897.tar.gz: WinHttpSendRequest() failed: 12029
https://github.com/ShiftMediaProject/VSYASM/archive/deb50d9f18e8461538468339d508cdf240e64897.tar.gz: WinHttpReceiveResponse() failed: 12152
https://github.com/ShiftMediaProject/VSYASM/archive/deb50d9f18e8461538468339d508cdf240e64897.tar.gz: WinHttpReceiveResponse() failed: 12152

[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(705)
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 3 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 7055 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 1.48 min (88715040 us)

CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:84 (message):

      Failed to download file with error: 1
      If you use a proxy, please check your proxy setting. Possible causes are:

      1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable
         to `https://address:port`. This is not correct, because `https://` prefix
         claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr
         , etc..) is an HTTP proxy. Try setting `http://address:port` to both
         HTTP_PROXY and HTTPS_PROXY instead.

      2. You are using Fiddler. Currently a bug (https://github.com/microsoft/vcpkg/issues/17752)
         will set HTTPS_PROXY to `https://fiddler_address:port` which lead to problem 1 above.
         Workaround is open Windows 10 Settings App, and search for Proxy Configuration page,
         Change `http=address:port;https=address:port` to `address`, and fill the port number.

      3. You proxy's remote server is out of service.

      In future vcpkg releases, if you are using Windows, you no longer need to set
      HTTP(S)_PROXY environment variables. Vcpkg will simply apply Windows IE Proxy
      Settings set by your proxy software. See (https://github.com/microsoft/vcpkg-tool/pull/49)
      and (https://github.com/microsoft/vcpkg-tool/pull/77)

      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
  scripts/cmake/vcpkg_download_distfile.cmake:309 (z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_from_github.cmake:175 (vcpkg_download_distfile)
  ports/vs-yasm/portfile.cmake:2 (vcpkg_from_github)
  scripts/ports.cmake:145 (include)


Error: Building package vs-yasm:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `git pull` and `.\vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+vs-yasm
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[vs-yasm]+Build+error
including:
  package: vs-yasm[core]:x64-windows -> 0.5.0#1
    vcpkg-tool version: 2022-02-11-dac008bf9b55ef48e10bcc81e273b97a82bbf72d
    vcpkg-scripts version: unknown

Additionally, attach any relevant sections from the log files above.

我的解答思路和尝试过的方法
我想要达到的结果
  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 2月28日
    • 创建了问题 2月20日

    悬赏问题

    • ¥15 Opencv配置出错
    • ¥15 模电中二极管,三极管和电容的应用
    • ¥15 关于模型导入UNITY的.FBX: Check external application preferences.警告。
    • ¥15 气象网格数据与卫星轨道数据如何匹配
    • ¥100 java ee ssm项目 悬赏,感兴趣直接联系我
    • ¥15 微软账户问题不小心注销了好像
    • ¥15 x264库中预测模式字IPM、运动向量差MVD、量化后的DCT系数的位置
    • ¥15 curl 命令调用正常,程序调用报 java.net.ConnectException: connection refused
    • ¥20 关于web前端如何播放二次加密m3u8视频的问题
    • ¥15 使用百度地图api 位置函数报错?