采用vcpkg安装boost相关的库时,LICENSE_1_0.txt下载失败

- 下载文件
license文件:https://raw.githubusercontent.com/boostorg/boost/boost-1.74.0/LICENSE_1_0.txt(需翻墙) 百度网盘链接:LICENSE_1_0.txt 提取码:vb3w jam文件:https://raw.githubusercontent.com/boostorg/boost/boost-1.74.0/boostcpp.jam(需翻墙) 百度网盘链接:boostcpp.jam 提取码:n74x - 文件重命名
将上述两个文件重命名为boost_LICENSE_1_0.txt、boost-1.74.0-boostcpp.jam - 文件移至
vcpkg/downloads - File does not have expected hash
 更改hash值,在E:\vcpkg\ports\boost-config\portfile.cmake 文件中更改hash值。  如果上面失败,可跳过hash值检验,在E:\vcpkg\scripts\cmake\vcpkg_download_distfile.cmake 文件中添加如下代码。其中路径改为自己电脑中该文件所在路径。
if("${FILE_PATH}" STREQUAL "E:/vcpkg/downloads/boost_LICENSE_1_0.txt")
message(STATUS "User Skipping hash check for ${FILE_PATH}.")
return()
endif()
if("${FILE_PATH}" STREQUAL "E:/vcpkg/downloads/boost-1.74.0-boostcpp.jam")
message(STATUS "User Skipping hash check for ${FILE_PATH}.")
return()
endif()
 至此,运行成功。 
|