ShadowsocksR-Live / shadowsocksr-native

翻墙 从容穿越党国敏感日 ShadowsocksR (SSRoT) native implementation for all platforms, GFW terminator
https://github.com/ShadowsocksR-Live/shadowsocksr-native/wiki
GNU General Public License v3.0
2.74k stars 762 forks source link

cmake error on Ubuntu Pi4 #209

Closed bigjimmy546 closed 2 years ago

bigjimmy546 commented 2 years ago

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-native are you using?

6149265

What operating system are you using?

Ubuntu 20.04.3 LTS on Raspberry Pi4

What did you do?

Server deploy

What did you expect to see?

Success

What did you see instead?

./ssrn-install.sh: line 380: /bin/cmake: cannot execute binary file: Exec format error /bin/cp: cannot stat './shadowsocksr-native/src/ssr-server': No such file or directory ShadowsocksR Native install failed, please contact @ssrlive

ssrlive commented 2 years ago

run this script with bash test.sh on your device, then post here what you see.

test.sh

    rm -rf ssrn
    git clone --recursive https://github.com/ShadowsocksR-Live/shadowsocksr-native.git ssrn
    mkdir ssrn/build && cd ssrn/build
    cmake .. && make
    cd ../..
bigjimmy546 commented 2 years ago

跑完 cmake .. && make 出现 bash: /usr/bin/cmake: cannot execute binary file: Exec format error

ssrlive commented 2 years ago

运行 cmake --version 命令是啥结果?

运行 lscpu | grep Architecture | awk '{print $2}' 命令是啥结果?

bigjimmy546 commented 2 years ago

跑完cmake之後出錯,需要重新安装cmake 再重新跑test.sh

2022-01-10 15:41:36 (6.60 MB/s) - ‘cmake_pkg.sh’ saved [45051301/45051301]

CMake Installer Version: 3.22.0, Copyright (c) Kitware This is a self-extracting archive. The archive will be extracted to: /usr/

Using target directory: /usr/ Extracting, please wait...

Unpacking finished successfully Failed to stop ssr-native.service: Unit ssr-native.service not loaded. ShadowsocksR uninstall success! Cloning into 'shadowsocksr-native'... Submodule 'depends/cstl' (https://github.com/ShadowsocksR-Live/cstl.git) registered for path 'depends/cstl' Submodule 'depends/http-parser' (https://github.com/ShadowsocksR-Live/http-parser.git) registered for path 'depends/http-parser' Submodule 'depends/json-c' (https://github.com/ShadowsocksR-Live/json-c.git) registered for path 'depends/json-c' Submodule 'depends/libbloom' (https://github.com/ShadowsocksR-Live/libbloom.git) registered for path 'depends/libbloom' Submodule 'depends/libsodium' (https://github.com/ShadowsocksR-Live/libsodium.git) registered for path 'depends/libsodium' Submodule 'depends/libuv' (https://github.com/ShadowsocksR-Live/libuv.git) registered for path 'depends/libuv' Submodule 'depends/mbedtls' (https://github.com/ShadowsocksR-Live/mbedtls.git) registered for path 'depends/mbedtls' Submodule 'depends/uri-encode' (https://github.com/ShadowsocksR-Live/uri-encode-c.git) registered for path 'depends/uri-encode' Submodule 'depends/uv-mbed' (https://github.com/ShadowsocksR-Live/uv-mbed.git) registered for path 'depends/uv-mbed' Cloning into '/root/shadowsocksr-native/depends/cstl'... Cloning into '/root/shadowsocksr-native/depends/http-parser'... Cloning into '/root/shadowsocksr-native/depends/json-c'... Cloning into '/root/shadowsocksr-native/depends/libbloom'... Cloning into '/root/shadowsocksr-native/depends/libsodium'... Cloning into '/root/shadowsocksr-native/depends/libuv'... Cloning into '/root/shadowsocksr-native/depends/mbedtls'... Cloning into '/root/shadowsocksr-native/depends/uri-encode'... Cloning into '/root/shadowsocksr-native/depends/uv-mbed'... Submodule path 'depends/cstl': checked out 'f103b2e073bf7f49be61c1892e0aab43152f3f03' Submodule path 'depends/http-parser': checked out '6a3d605ded6b4b8abc0a5eb01409fbd185629935' Submodule path 'depends/json-c': checked out '7b616b05f15bd784e9dce0bf5ca4012666090fb1' Submodule path 'depends/libbloom': checked out '2410ddaa6cacd976c8a1ccf090b524d940d40dac' Submodule path 'depends/libsodium': checked out '0738b0d63efe7995b0370f84095873ae78a287dd' Submodule path 'depends/libuv': checked out '98e92d136577802a48a621ff7edbe7dc508b50ec' Submodule path 'depends/mbedtls': checked out 'd83b865920e709fd1409cea0a868d84d9d811b29' Submodule path 'depends/uri-encode': checked out 'fcea083a12818af72b346f3c8e045fbbbe94aa07' Submodule path 'depends/uv-mbed': checked out '60f4242f33eab089e4a3ba3db423f80a319ac663' Switched to branch 'master' Your branch is up to date with 'origin/master'. Switched to branch 'master' Your branch is up to date with 'origin/master'. Switched to branch 'master' Your branch is up to date with 'origin/master'. Switched to branch 'master' Your branch is up to date with 'origin/master'. Switched to branch 'master' Your branch is up to date with 'origin/master'. Switched to branch 'v1.x' Your branch is up to date with 'origin/v1.x'. Switched to branch 'master' Your branch is up to date with 'origin/master'. Switched to branch 'master' Your branch is up to date with 'origin/master'. Switched to branch 'master' Your branch is up to date with 'origin/master'. ./ssrn-install.sh: line 380: /bin/cmake: cannot execute binary file: Exec format error /bin/cp: cannot stat './shadowsocksr-native/src/ssr-server': No such file or directory ShadowsocksR Native install failed, please contact @ssrlive

root@ubuntu:~# cmake --version bash: /usr/bin/cmake: cannot execute binary file: Exec format error

root@ubuntu:~# lscpu | grep Architecture | awk '{print $2}' aarch64

ssrlive commented 2 years ago

看来得改脚本了。

root@ubuntu:~# lscpu | grep Architecture | awk '{print $2}'
aarch64

aarch64 不是 x86_64.

单独安装 cmake

sudo apt remove cmake -y
sudo apt update
sudo apt install -y cmake

脚本里搜索 cmake ,把 安装 cmake 的那几句删了,再跑脚本? image

bigjimmy546 commented 2 years ago

可以了,感谢

ssrlive commented 2 years ago

SSR 服务器正确安装上了吗?

bigjimmy546 commented 2 years ago

SSR裝上了,謝謝