ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

Hope to support arm architecture.

Open xie-xuan opened this issue 2 years ago • 7 comments

OSError: /home/pi/.local/lib/python3.7/site-packages/tls_client/dependencies/tls-client-amd64.so: wrong ELF class: ELFCLASS64 Hello, I try to build an online robot on the raspberry pi, but it shows that this library is for amd architecture. Hope to add support for arm architecture.

xie-xuan avatar Dec 08 '22 15:12 xie-xuan

There is a pull request on the way https://github.com/FlorianREGAZ/Python-Tls-Client/pull/15

acheong08 avatar Dec 08 '22 15:12 acheong08

Thank you

xie-xuan avatar Dec 08 '22 15:12 xie-xuan

or you can remove tls client and use requests and it will work

Mila432 avatar Dec 09 '22 08:12 Mila432

Does it? I was informed by rawandahmad698 that there are some steps that requires TLS client.

acheong08 avatar Dec 09 '22 08:12 acheong08

I will do some testing

acheong08 avatar Dec 09 '22 08:12 acheong08

OSError: /home/pi/.local/lib/python3.7/site-packages/tls_client/dependencies/tls-client-amd64.so: wrong ELF class: ELFCLASS64 Hello, I try to build an online robot on the raspberry pi, but it shows that this library is for amd architecture. Hope to add support for arm architecture.

我也是arm用户,我手上有一个aarch64架构的设备,tls库的问题我解决了,解决办法如下:

  1. 给你的arm机器配置go环境
  2. tls-client库clone下来
  3. cd cffi_dist/
  4. 执行GOOS=linux CGO_ENABLED=1 GOARCH=arm64 go build -buildmode=c-shared -o ./tls-client-aarch64.so
  5. 获得bulid后的so文件
  6. 将这个so文件cp到python tls_client库的dependencies文件夹中
  7. 最后修改cffi.py的第12行file_ext = '-x86.so' if "x86" in machine() else ('-aarch64.so' if "aarch" in machine() else '-amd64.so' )

Awoodwhale avatar Dec 09 '22 15:12 Awoodwhale

OSError: /home/pi/.local/lib/python3.7/site-packages/tls_client/dependencies/tls-client-amd64.so: wrong ELF class: ELFCLASS64 Hello, I try to build an online robot on the raspberry pi, but it shows that this library is for amd architecture. Hope to add support for arm architecture.

我也是arm用户,我手上有一个aarch64架构的设备,tls库的问题我解决了,解决办法如下:

  1. 给你的arm机器配置go环境
  2. tls-client库clone下来
  3. cd cffi_dist/
  4. 执行GOOS=linux CGO_ENABLED=1 GOARCH=arm64 go build -buildmode=c-shared -o ./tls-client-aarch64.so
  5. 获得bulid后的so文件
  6. 将这个so文件cp到python tls_client库的dependencies文件夹中
  7. 最后修改cffi.py的第12行file_ext = '-x86.so' if "x86" in machine() else ('-aarch64.so' if "aarch" in machine() else '-amd64.so' )

兄弟,给力啊! 步骤1卡了我许久,最后按以下方式搞定,其中go1.16.4版本改为go1.18.4 https://blog.csdn.net/xiaoyou625/article/details/117195159

Vector-Cross avatar Dec 12 '22 04:12 Vector-Cross