测试下列命令:
wget https://github.com/datalad/example-dicom-structural/raw/master/dicoms/N2D_0001.dcm
显示下列错误:
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Unable to establish SSL connection.
原因是:
As written on the project page of wget, the secure protocols TLSv1_1 and TLSv1_2 were added in wget version 1.16.1. Your wget 1.15 does not support it.
wget1.15版本不支持HTTPS
于是升级wget:
brew install wget
显示成功安装版本1.19.5
检查wget的版本:
wget --version
wget --versionGNU Wget 1.15 built on linux-gnu.+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
怎么还是1.15版本?怎么回事呢?
which wget
/usr/local/bin/wget
查找wget
find /usr/ -name "wget"
/usr//local/bin/wget
/usr//local/Cellar/wget
/usr//local/Cellar/wget/1.19.5/bin/wget
这是什么鬼?存在多个版本!原来brew安装的文件不在/user/local/bin的目录下
删除系统默认版本:
sudo rm -f /usr/local/bin/wget
解决:
sudo cp /usr/local/Cellar/wget/1.19.5/bin/wget /usr/local/bin/
再来测试:
wget https://github.com/datalad/example-dicom-structural/raw/master/dicoms/N2D_0001.dcm
网友评论