本文主要是介绍安装curl_cffi@FreeBSD(未成功),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
gpt4free需要curl_cffi,但是在FreeBSD没有编译成功。记录留档。
gpt4free网址:GitHub - xtekky/gpt4free: The official gpt4free repository | various collection of powerful language models
curl_cffi网址:GitHub - yifeikong/curl_cffi: Python binding for curl-impersonate via cffi. A http client that can impersonate browser tls/ja3/http2 fingerprints.
curl-impersonate网址:https://github.com/lwthiker/curl-impersonate
尝试安装curl-impersonate
git clone https://github.com/lwthiker/curl-impersonate
cd curl-impersonate
mkdir build && cd build
../configure
# Build and install the Firefox version
make firefox-build
sudo make firefox-install
# Build and install the Chrome version
make chrome-build
sudo make chrome-install
# You may need to update the linker's cache to find libcurl-impersonate
sudo ldconfig
# Optionally remove all the build files
cd ../ && rm -Rf build
可惜这里没有过去。
尝试安装curl_cffi
首先碰到了报错'curl/curl.h' file not found ,把linux下的curl目录cp到freebsd的python 的include目录,即最终目录是这样的:py310/include/curl/
然后就碰到了unable to find library -lcurl-impersonate-chrome报错,这里过不去了。
调试
安装报错'curl/curl.h' file not found
In file included from build/temp.freebsd-13.2-RELEASE-p10-amd64-3.10/curl_cffi._wrapper.c:570:
curl_cffi/ffi/shim.h:5:10: fatal error: 'curl/curl.h' file not found
#include "curl/curl.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/cc' failed with exit code 1
把ubuntu下的curl目录cp过来:
cp -rf /usr/home/linuxskywalk/py310/include/curl /home/skywalk/py310/include/
报错 unable to find library -lcurl-impersonate-chrome
ld: error: unable to find library -lcurl-impersonate-chrome
cc: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/cc' failed with exit code 1
可以下载这个代码安装: https://github.com/lwthiker/curl-impersonate
但是没有编译成功
连报错都看不懂
编译curl-impersonate报错
make: "/usr/home/skywalk/github/curl-impersonate/build/Makefile" line 219: warning: duplicate script for target "ifeq" ignored
make: "Makefile" line 84: warning: using previous script for "ifeq" defined here
make: "/usr/home/skywalk/github/curl-impersonate/build/Makefile" line 219: warning: duplicate script for target "(x86_64-unknown-freebsd13.2,x86_64-unknown-freebsd13.2)" ignored
make: "Makefile" line 84: warning: using previous script for "(x86_64-unknown-freebsd13.2,x86_64-unknown-freebsd13.2)" defined here
make: "/usr/home/skywalk/github/curl-impersonate/build/Makefile" line 220: Invalid line type
make: "/usr/home/skywalk/github/curl-impersonate/build/Makefile" line 252: Invalid line type
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/skywalk/github/curl-impersonate/build
这篇关于安装curl_cffi@FreeBSD(未成功)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!