我正试图通过bash安装一个github文件,如下所示
https://github.com/allenai/s2orc-doc2json
bash scripts/setup_grobid.sh但是我得到了以下错误
bash scripts/setup_grobid.sh
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
--2022-07-21 20:55:25-- https://github.com/kermitt2/grobid/archive/0.6.1.zip
Resolving github.com... 140.82.121.4
Connecting to github.com|140.82.121.4|:443... connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.
unzip: cannot find or open 0.6.1.zip, 0.6.1.zip.zip or 0.6.1.zip.ZIP.
rm: cannot remove '0.6.1.zip': No such file or directory
scripts/setup_grobid.sh: line 11: cd: /c/Users/User/grobid-0.6.1: No such file or directory
scripts/setup_grobid.sh: line 12: ./gradlew: No such file or directory
cp: cannot stat '/c/Users/User/git/s2orc-pdf2json/pdf2json/grobid/config.yaml': No such file or directory
cp: cannot stat '/c/Users/User/git/s2orc-pdf2json/pdf2json/grobid/grobid.properties': No such file or directory
scripts/setup_grobid.sh: line 22: ./gradlew: No such file or directory这是通过setup_grobid.sh运行它之后的ShellCheck.net
#!/usr/bin/env bash
# put in your pdf2json directory here
export PDF2JSON_HOME=$HOME/Desktop/s2orc-doc2json-main
# Download Grobid
cd "$HOME" || exit
wget https://github.com/kermitt2/grobid/archive/0.6.1.zip
unzip 0.6.1.zip
rm 0.6.1.zip
cd "$HOME"/Desktop/s2orc-doc2json-main/grobid-0.6.1 || exit
./gradlew clean install
## Grobid configurations
# increase max.connections to slightly more than number of processes
# decrease logging level
# this isn't necessary but is nice to have if you are processing lots of files
cp "$PDF2JSON_HOME"/pdf2json/grobid/config.yaml "$HOME"/grobid-0.6.1/grobid-service/config/config.yaml
cp "$PDF2JSON_HOME"/pdf2json/grobid/grobid.properties "$HOME"/grobid-0.6.1/grobid-home/config/grobid.properties
## Start Grobid
./gradlew run我甚至尝试过--no-check-certificate,但仍然得到了同样的错误。
编辑:我使用的是Wget 1.11.4 / OpenSSL 1.1.1q 5,7月2022年
发布于 2022-07-21 18:26:33
诉说
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version这可能是由于github降低了对传统TLS版本协议https://github.blog/2018-02-01-crypto-removal-notice/和相当过时的wget+openssl安装的支持。
尝试强制使用一个特定的现代TLS协议,看看它是如何运行的。
wget --secure-protocol=TLSv1_2 https://github.com/kermitt2/grobid/archive/0.6.1.zip 或尝试升级您的安装
作为经验法则,开始您的脚本
set -ex所以他们
如果任何指令失败,则
https://stackoverflow.com/questions/73070811
复制相似问题