在编译mariadb-10.11.6时,可能会出现error: downloading,部分包组从github上下载失败,这是因为mariadb在编译时查找依赖包组,如果系统中缺少相关支持,则会尝试通过网络进行下载。因此,主要归因于网络连接不佳或目标服务器不可用,导致下载失败。
完整报错内容如下
报错一:
CMake Error at pcre2-stamp/download-pcre2.cmake:170 (message): Each download failed! error: downloading 'https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.zip' failed status_code: 92 status_string: "Stream error in the HTTP/2 framing layer" log: --- LOG BEGIN --- Trying 20.205.243.166:443... Connected to github.com (20.205.243.166) port 443 (#0) ALPN, offering h2 ALPN, offering http/1.1 successfully set certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none [5 bytes data] TLSv1.3 (OUT), TLS handshake, Client hello (1): [512 bytes data] [5 bytes data] TLSv1.3 (IN), TLS handshake, Server hello (2): [122 bytes data] [5 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): [19 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Certificate (11): [2459 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, CERT verify (15): [78 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Finished (20): [36 bytes data] [5 bytes data] TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): [1 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (OUT), TLS handshake, Finished (20): [36 bytes data] SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 ALPN, server accepted to use h2 Server certificate: subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com start date: Feb 14 00:00:00 2023 GMT expire date: Mar 14 23:59:59 2024 GMT subjectAltName: host "github.com" matched cert's "github.com" issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS Hybrid ECC SHA384 2020 CA1 SSL certificate verify ok. Using HTTP2, server supports multiplexing Connection state changed (HTTP/2 confirmed) Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 [5 bytes data] [1 bytes data] [5 bytes data] [1 bytes data] [5 bytes data] [1 bytes data] Using Stream ID: 1 (easy handle 0x1944ee0) [5 bytes data] [1 bytes data] GET /PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.zip HTTP/2 Host: github.com user-agent: curl/7.79.1 accept: */* HTTP/2 stream 1 was not closed cleanly before end of the underlying stream [5 bytes data] [1 bytes data] stopped the pause stream! Connection #0 to host github.com left intact --- LOG END ---
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | CMake Error at pcre2-stamp/download-pcre2.cmake:170 (message): Each download failed! error: downloading 'https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.zip' failed status_code: 92 status_string: "Stream error in the HTTP/2 framing layer" log: --- LOG BEGIN --- Trying 20.205.243.166:443... Connected to github.com (20.205.243.166) port 443 (#0) ALPN, offering h2 ALPN, offering http/1.1 successfully set certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none [5 bytes data] TLSv1.3 (OUT), TLS handshake, Client hello (1): [512 bytes data] [5 bytes data] TLSv1.3 (IN), TLS handshake, Server hello (2): [122 bytes data] [5 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): [19 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Certificate (11): [2459 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, CERT verify (15): [78 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Finished (20): [36 bytes data] [5 bytes data] TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): [1 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (OUT), TLS handshake, Finished (20): [36 bytes data] SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 ALPN, server accepted to use h2 Server certificate: subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com start date: Feb 14 00:00:00 2023 GMT expire date: Mar 14 23:59:59 2024 GMT subjectAltName: host "github.com" matched cert's "github.com" issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS Hybrid ECC SHA384 2020 CA1 SSL certificate verify ok. Using HTTP2, server supports multiplexing Connection state changed (HTTP/2 confirmed) Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 [5 bytes data] [1 bytes data] [5 bytes data] [1 bytes data] [5 bytes data] [1 bytes data] Using Stream ID: 1 (easy handle 0x1944ee0) [5 bytes data] [1 bytes data] GET /PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.zip HTTP/2 Host: github.com user-agent: curl/7.79.1 accept: */* HTTP/2 stream 1 was not closed cleanly before end of the underlying stream [5 bytes data] [1 bytes data] stopped the pause stream! Connection #0 to host github.com left intact --- LOG END --- |
报错二:
CMake Error at libfmt-stamp/download-libfmt.cmake:170 (message): Each download failed! error: downloading 'https://github.com/fmtlib/fmt/archive/refs/tags/8.0.1.zip' failed status_code: 92 status_string: "Stream error in the HTTP/2 framing layer" log: --- LOG BEGIN --- Trying 20.205.243.166:443... Connected to github.com (20.205.243.166) port 443 (#0) ALPN, offering h2 ALPN, offering http/1.1 successfully set certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none [5 bytes data] TLSv1.3 (OUT), TLS handshake, Client hello (1): [512 bytes data] [5 bytes data] TLSv1.3 (IN), TLS handshake, Server hello (2): [122 bytes data] [5 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): [19 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Certificate (11): [2459 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, CERT verify (15): [79 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Finished (20): [36 bytes data] [5 bytes data] TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): [1 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (OUT), TLS handshake, Finished (20): [36 bytes data] SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 ALPN, server accepted to use h2 Server certificate: subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com start date: Feb 14 00:00:00 2023 GMT expire date: Mar 14 23:59:59 2024 GMT subjectAltName: host "github.com" matched cert's "github.com" issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS Hybrid ECC SHA384 2020 CA1 SSL certificate verify ok. Using HTTP2, server supports multiplexing Connection state changed (HTTP/2 confirmed) Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 [5 bytes data] [1 bytes data] [5 bytes data] [1 bytes data] [5 bytes data] [1 bytes data] Using Stream ID: 1 (easy handle 0x5621c4456320) [5 bytes data] [1 bytes data] GET /fmtlib/fmt/archive/refs/tags/8.0.1.zip HTTP/2 Host: github.com user-agent: curl/7.79.1 accept: */* HTTP/2 stream 1 was not closed cleanly before end of the underlying stream [5 bytes data] [1 bytes data] stopped the pause stream! Connection #0 to host github.com left intact --- LOG END ---
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | CMake Error at libfmt-stamp/download-libfmt.cmake:170 (message): Each download failed! error: downloading 'https://github.com/fmtlib/fmt/archive/refs/tags/8.0.1.zip' failed status_code: 92 status_string: "Stream error in the HTTP/2 framing layer" log: --- LOG BEGIN --- Trying 20.205.243.166:443... Connected to github.com (20.205.243.166) port 443 (#0) ALPN, offering h2 ALPN, offering http/1.1 successfully set certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none [5 bytes data] TLSv1.3 (OUT), TLS handshake, Client hello (1): [512 bytes data] [5 bytes data] TLSv1.3 (IN), TLS handshake, Server hello (2): [122 bytes data] [5 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): [19 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Certificate (11): [2459 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, CERT verify (15): [79 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (IN), TLS handshake, Finished (20): [36 bytes data] [5 bytes data] TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): [1 bytes data] [5 bytes data] [1 bytes data] TLSv1.3 (OUT), TLS handshake, Finished (20): [36 bytes data] SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 ALPN, server accepted to use h2 Server certificate: subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com start date: Feb 14 00:00:00 2023 GMT expire date: Mar 14 23:59:59 2024 GMT subjectAltName: host "github.com" matched cert's "github.com" issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS Hybrid ECC SHA384 2020 CA1 SSL certificate verify ok. Using HTTP2, server supports multiplexing Connection state changed (HTTP/2 confirmed) Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 [5 bytes data] [1 bytes data] [5 bytes data] [1 bytes data] [5 bytes data] [1 bytes data] Using Stream ID: 1 (easy handle 0x5621c4456320) [5 bytes data] [1 bytes data] GET /fmtlib/fmt/archive/refs/tags/8.0.1.zip HTTP/2 Host: github.com user-agent: curl/7.79.1 accept: */* HTTP/2 stream 1 was not closed cleanly before end of the underlying stream [5 bytes data] [1 bytes data] stopped the pause stream! Connection #0 to host github.com left intact --- LOG END --- |
解决方法一:
可以修改hosts文件,或是更换网络环境,这样在mariadb编译时可以顺利下载包组。
那么问题来了,如果该服务器在内网,没有网络环境呢?
解决办法二(推荐):
该解决办法不受网络环境因素影响,我们提前把所需要的包组下载下来并放置在mariadb里面,在编译时,mariadb可以找到这个包,就不从网络下载了。
创建包组目录并放置所需包组
mkdir -p mariadb-10.6.16/extra/pcre2/src mkdir -p mariadb-10.6.16/extra/libfmt/src
|-----|------------------------------------------------------------------------------------| | 1 2 | mkdir -p mariadb-10.6.16/extra/pcre2/src mkdir -p mariadb-10.6.16/extra/libfmt/src |
将pcre2-10.42.zip上传至mariadb-10.6.16/extra/pcre2/src目录下
将fmt-8.0.1.zip上传至mariadb-10.6.16/extra/libfmt/src目录下并改名为8.0.1.zip,注意版本不同,可能fmt-8.0.1.zip无需更改为8.0.1.zip。
再次编译时就可以看到已找到包组忽略下载
-- verifying file... file='/mariadb-10.11.6/extra/libfmt/src/8.0.1.zip' -- File already exists and hash match (skip download): file='/mariadb-10.11.6/extra/libfmt/src/8.0.1.zip' MD5='e77873199e897ca9f780479ad68e25b1' -- extracting... src='/mariadb-10.11.6/extra/libfmt/src/8.0.1.zip' dst='/mariadb-10.11.6/extra/libfmt/src/libfmt' -- extracting... [tar xfz] -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 2 3 4 5 6 7 8 9 10 11 12 13 | -- verifying file... file='/mariadb-10.11.6/extra/libfmt/src/8.0.1.zip' -- File already exists and hash match (skip download): file='/mariadb-10.11.6/extra/libfmt/src/8.0.1.zip' MD5='e77873199e897ca9f780479ad68e25b1' -- extracting... src='/mariadb-10.11.6/extra/libfmt/src/8.0.1.zip' dst='/mariadb-10.11.6/extra/libfmt/src/libfmt' -- extracting... [tar xfz] -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done |
注意: 需要结合你当前的环境报错,我这里是pcre2和fmt包,还需要注意报错的版本,包和版本需要对应上,并放置在对应的目录中,结合我这里的示例进行灵活变通,理论适用于其它mariadb版本。
PS:推荐使用wlnmp一键安装包来安装mariadb,减少编译时间,添加好wlnmp源后,直接yum安装即可。