无法在Windows 7(64位)库问题上安装cURL
我无法在64位版本的Windows 7上安装cURL。查看多个教程后,我被告知要执行以下操作:无法在Windows 7(64位)库问题上安装cURL,curl,command-line-interface,Curl,Command Line Interface,我无法在64位版本的Windows 7上安装cURL。查看多个教程后,我被告知要执行以下操作: curl http://localhost:3000/posts --data 'title=test' --data-urlencode 'link=http://www.test.com' 从网站()下载cURL 在C驱动器的底部创建一个“curl”目录(C:\curl) 将下载的curl.exe文件放入“curl”目录(C:\curl\curl.exe) 访问证书页() 下载cacert.pe
curl http://localhost:3000/posts --data 'title=test' --data-urlencode 'link=http://www.test.com'
C:\
- curl.exe
- curl-ca-bundle.crt
curl --data 'title=test&link=http://test.com' http://localhost:3000/posts
无论我的代码是否工作,cURL命令都会返回以下错误:
curl:./.libs/lt-curl.c:233: FATAL: couldn't find curl.
对于我的问题,或者在Windows7 64位机器上安装cURL的替代方案,有什么想法吗?我找到了答案。如果curl命令没有经过第一次清理(我的请求中包含“:”和“/”),您似乎无法从curl命令请求数据。首先需要使用“data urlencode”开关对数据进行消毒 例如,如果我尝试运行以下命令:
curl http://localhost:3000/posts --data 'title=test'
没有任何问题。但是,如果我试图传递来自链接文本字段的网站:
curl http://localhost:3000/posts --data 'title=test&link=http://test.com'
我将收到以下错误(在Windows命令提示符中):
即使我试着只用“点”:
curl http://localhost:3000/posts --data 'title=test&link=www.test.com'
我将收到以下错误(在Windows命令提示符中):
我的解决方案是卷曲如下:
curl http://localhost:3000/posts --data 'title=test' --data-urlencode 'link=http://www.test.com'
它成功地卷曲了
本页提供的初始想法为第二个答案:
为什么要标记这个angularjs?@Dr.Avalanche,因为我正在运行Angular.js安装程序。虽然我确信这纯粹是一个卷曲问题,但特定的lib调用错误可能与人们试图比其他人看得更多的问题有关。目前还不确定。
curl http://localhost:3000/posts --data 'title=test' --data-urlencode 'link=http://www.test.com'