我用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