microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.87k stars 6.31k forks source link

I want to install some third library,but vcpck failed to download all the time #20297

Closed North2Tree closed 2 years ago

North2Tree commented 3 years ago

C:\Users\Administrator\Desktop\1>vcpkg install zlib boost-iostreams boost-program-options boost-system boost-serialization eigen3 cgal[core] opencv glew glfw3 --triplet=x64-windows Computing installation plan... The following packages will be built and installed:

[DEBUG] D:\a_work\1\s\src\vcpkg\base\downloads.cpp(626) [DEBUG] Exiting after 19.67 s us (19470304 us)

CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:83 (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:274 (z_vcpkg_download_distfile_show_proxy_and_fail) scripts/cmake/vcpkg_from_github.cmake:173 (vcpkg_download_distfile) ports/boost-type-traits/portfile.cmake:3 (vcpkg_from_github) scripts/ports.cmake:140 (include)

Error: Building package boost-type-traits:x64-windows failed with: BUILD_FAILED Please ensure you're using the latest portfiles with .\vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including: Package: boost-type-traits:x64-windows Vcpkg version: 2021-09-10-2059ef11aa6067e6f59b0d939c5d17e3c5c47d3e

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

NancyLi1013 commented 3 years ago

Hi @North2Tree

Thanks for posting this issue.

Could you please try to download https://github.com/boostorg/type_traits/archive/boost-1.76.0.tar.gz manually?

Then copy the archive file to _vcpkg_rootpath/downloads and rename it as boostorg-type_traits-boost-1.76.0.tar.gz to rebuild this.

North2Tree commented 2 years ago

Thank you for your response, it is very useful to me, although it is a bit troublesome to download manually.