Perl 6 Cro's stub doesn't 运行: HTTP/2 is requested, but ALPN is not supported

Perl 6 Cro's stub doesn't run: HTTP/2 is requested, but ALPN is not supported

我用 Perl 6 的 cro 创建了一个存根服务,但它出错了,因为 "ALPN is not supported"。

$ 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:i386libssl0.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 

向系统安装新的 .so 文件通常需要更新 ld 的缓存; apt、rpm 和朋友们都在 post-install hooks automatically when needed 中这样做,但是当你手动安装一个库时,你可能不得不手动完成。

执行此操作的命令是

sudo ldconfig

希望对您有所帮助!