我用 Perl 6 的 cro 创建了一个存根服务,但由于“不支持 ALPN”而出错。
$ cro stub http ds4 ds4
Stubbing a HTTP Service 'ds4' in 'ds4'...
First, please provide a little more information.
Secure (HTTPS) (yes/no) [no]: yes
Support HTTP/1.1 (yes/no) [yes]:
Support HTTP/2.0 (yes/no) [yes]:
Support Web Sockets (yes/no) [no]: yes
$ cd ds4
$ cro run
▶ Starting ds4 (ds4)
Endpoint HTTPS will be at https://localhost:20000/
♻ Restarting ds4 (ds4)
⚠ ds4 HTTP/2 is requested, but ALPN is not supported
⚠ ds4 in method new at /home/zoffix/rakudo/install/share/perl6/site/sources/D142088174DCE80630FC7C31793703D9D56E26D6 (Cro::HTTP::Server) line 128
⚠ ds4 in block <unit> at service.p6 line 5
⚠ ds4
我用谷歌搜索了这个错误,但我得到的只是重建 nginx 和 Apache 的信息,我没有使用它们。它提到了 libssl,并且在我拥有的这个相当古老的安装中libssl1.0.0:i386
,libssl0.9.8:i386
没有可用的更新包。
手动编译一个新的 libssl 可能会解决我遇到的问题吗?
更新:假设我确实正确安装了较新的 libssl,问题仍然存在:
$ cd $(mktemp -d)
$ wget https://www.openssl.org/source/openssl-1.1.1-pre6.tar.gz
$ tar -xvvf *
$ cd open*
$ ./config && make
$ make
$ sudo make install
...
$ zef uninstall Cro::Core Cro::HTTP cro Cro::TLS Cro::WebSocket OpenSSL IO::Socket::SSL IO::Socket::SSL::Async
$ zef install --/test cro
$ cro run
▶ Starting ds4 (ds4)
Endpoint HTTPS will be at https://localhost:20000/
♻ Restarting ds4 (ds4)
⚠ ds4 HTTP/2 is requested, but ALPN is not supported
⚠ ds4 in method new at /home/zoffix/rakudo/install/share/perl6/site/sources/AA08D168A5945413FFDA254577A6F6FF64F66989 (Cro::HTTP::Server) line 128
⚠ ds4 in block <unit> at service.p6 line 5
⚠ ds4