我用Perl 6的cro创建了一个 stub 服务,但由于“不支持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
最佳答案
将新的.so
文件安装到系统中通常需要更新ld
的缓存。 apt,rpm和 friend 在需要时都自动在安装后 Hook 中执行此操作,但是当您手动安装库时,可能必须手动执行。
执行此操作的命令是sudo ldconfig
希望对您有所帮助!