rapiz1 / rathole

A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
8.82k stars 441 forks source link

Latest Release: error while loading shared libraries #299

Closed Cyberes closed 8 months ago

Cyberes commented 8 months ago

Describe the bug Version 0.5.0 is having trouble finding the crypto libraries:

./rathole: error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directory

and

./rathole: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

This is running on a Docker container. I do have libssl-dev and openssl installed. Manually linking the files to the paths rathole expects fixes the problem (for example: ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/libssl.so.3).

Configuration Configuration used to reproduce the behavior:

N/A

Logs See above

Environment: OS:

Linux n6svla7wo2 5.19.0-45-generic #46~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 7 15:06:04 UTC 20 x86_64 x86_64 x86_64 GNU/Linux

rathole --version output:

rathole 
Build Timestamp:     2023-05-26T08:34:46.705850981Z
Build Version:       0.4.8
Commit SHA:          Some("9727e15377d9430cd2d3b97f2292037048610209")
Commit Date:         Some("2023-05-26T08:29:56Z")
Commit Branch:       Some("detached HEAD")
cargo Target Triple: x86_64-unknown-linux-gnu
cargo Profile:       release
cargo Features:      base64,client,default,hot_reload,noise,notify,server,snowstorm,tls,tokio_native_tls

CPU architecture:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          8
On-line CPU(s) list:             0-7
Thread(s) per core:              1
Core(s) per socket:              8
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           106
Model name:                      Intel(R) Xeon(R) Gold 5315Y CPU @ 3.20GHz
Stepping:                        6
CPU MHz:                         3200.274
BogoMIPS:                        6400.14
Hypervisor vendor:               Xen
Virtualization type:             full
L1d cache:                       384 KiB
L1i cache:                       256 KiB
L2 cache:                        10 MiB
L3 cache:                        96 MiB
NUMA node0 CPU(s):               0-7
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc re
                                 p_good nopl cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3d
                                 nowprefetch cpuid_fault invpcid_single pti ibpb fsgsbase bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetb
                                 v1 xsaves umip pku ospke vaes vpclmulqdq rdpid
Cyberes commented 8 months ago

Version v0.4.8 works fine.

fernvenue commented 8 months ago

Read the release note carefully:

Because of the maintenance burden of linking TLS libraries, we don't compile the TLS feature in the release for embedded platforms anymore. If you need to use it, please build from the source by yourself. We will add it back when a pure rust tls library or a good cross-platform TLS libraries linking solution is available.

TLDR, compile binary by yourself.

Cyberes commented 8 months ago

I saw that, but I don't consider Ubuntu an "embedded platform"

rapiz1 commented 8 months ago

Creating a symbolic link is not the right thing to do here. The last few digits in the name of shared libraries are the version. So here the error message indicates rathole uses openssl3(which is a relatively new thing) and your system is missing that

px307 commented 2 months ago

Read the release note carefully:

Because of the maintenance burden of linking TLS libraries, we don't compile the TLS feature in the release for embedded platforms anymore. If you need to use it, please build from the source by yourself. We will add it back when a pure rust tls library or a good cross-platform TLS libraries linking solution is available.

TLDR, compile binary by yourself.

how to compile it ,can you show some example ,i use centos . thanks