windows安装fdfs_lient报错”fdfs_client/sendfilemodule: fatal error C1189: error: platfom not supported”

windows安装fdfs_lient报错”fdfs_client/sendfilemodule: fatal error C1189: error: platfom not supported”windows 安装 fdfs lient 报错 fdfs client sendfilemodu fatalerrorC1 error platfomnotsu 报错详情 报错内容 windows 这个平台不支持 fdfs client runninginsta eggrunningeg infowritingf

windows安装fdfs_lient报错”fdfs_client/sendfilemodule: fatal error C1189: #error: platfom not supported”

报错详情(报错内容:windows这个平台不支持fdfs_client)

running install running bdist_egg running egg_info writing fdfs_client_py.egg-info\PKG-INFO writing dependency_links to fdfs_client_py.egg-info\dependency_links.txt writing top-level names to fdfs_client_py.egg-info\top_level.txt reading manifest file 'fdfs_client_py.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'fdfs_client\client.conf' writing manifest file 'fdfs_client_py.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py running build_ext building 'fdfs_client.sendfile' extension C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ie:\anaconda3\include -Ie:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcfdfs_client/sendfilemodule.c /Fobuild\temp.win-amd64-3.6\Release\fdfs_client/sendfilemodule.obj sendfilemodule.c fdfs_client/sendfilemodule.c(53): fatal error C1189: #error: platfom not supported error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2 
pip install mutagen pip isntall requests 

修改fdfs_client/storage_client.py文件,将第12行删除或注释(否则,使用时会报错ImportError: No module named sendfile)

# from fdfs_client.sendfile import * 将改行注释或者删除 

在这里插入图片描述然后创建client.conf文件,我所创建的路径为“F:\Projects\django_env”。
在这里插入图片描述client.conf文件中将以下代码复制及进去,修改并保存,修改tracker_server=127.0.0.1:22122这行,将‘127.0.0.1’修改成你自己的服务器地址(22122端口需要自己在阿里云上配置安全规则),还需要修改‘base_path=F:\Projects\django_env’,base_path修改成你自己的path。

# connect timeout in seconds # default value is 30s connect_timeout=30 # network timeout in seconds # default value is 30s network_timeout=60 # the base path to store log files base_path=F:\Projects\django_env # tracker_server can ocur more than once, and tracker_server format is # "host:port", host can be hostname or ip address tracker_server=127.0.0.1:22122 #standard log level as syslog, case insensitive, value list:  emerg for emergency  alert  crit for critical  error  warn for warning  notice  info  debug log_level=info # if use connection pool # default value is false # since V4.05 use_connection_pool = false # connections whose the idle time exceeds this time will be closed # unit: second # default value is 3600 # since V4.05 connection_pool_max_idle_time = 3600 # if load FastDFS parameters from tracker server # since V4.05 # default value is false load_fdfs_parameters_from_tracker=false # if use storage ID instead of IP address # same as tracker.conf # valid only when load_fdfs_parameters_from_tracker is false # default value is false # since V4.05 use_storage_id = false # specify storage ids filename, can use relative or absolute path # same as tracker.conf # valid only when load_fdfs_parameters_from_tracker is false # since V4.05 storage_ids_filename = storage_ids.conf #HTTP settings http.tracker_server_port=80 #use "#include" directive to include HTTP other settiongs include http.conf 

测试代码:

from fdfs_client.client import Fdfs_client client = Fdfs_client('F:/Projects/django_env/client.conf') ret = client.upload_by_filename('timg.jpg') print(ret) 

在这里插入图片描述输出控制台

F:\Projects\django_env\Scripts\python.exe F:/Projects/axf/fastdfs_demo/test.py getting connection <fdfs_client.connection.Connection object at 0x00000BE0> <fdfs_client.fdfs_protol.Tracker_header object at 0x00000BA8> { 
   'Group name': 'group1', 'Remote file_id': 'group1\\M00/00/00/rBBx9lxQEX2AO4peAANB4Pemyig458.jpg', 'Status': 'Upload successed.', 'Local file name': 'timg.jpg', 'Uploaded size': '208.00KB', 'Storage IP': '47.98.173.29'} Process finished with exit code 0 

OK,能正常使用了。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/177076.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月26日 下午8:22
下一篇 2026年3月26日 下午8:22


相关推荐

  • 编写第一个Java程序 HelloWorld

    编写第一个Java程序 HelloWorld1 程序开发的步骤第一步 编写源程序程序员自己写的程序 所有程序员都可以看得懂源代码文件的本质上就是一个文本文档 但扩展名不是 txt 而是 java 第二步 编译源程序 JVM Java 虚拟机 是专门用来运行 Java 程序的但是 JVM 只能识别 0 和 1 而储存 0 和 1 的文件就叫做字节码文件 class 文件 所以我们需要把源代码程序翻译乘 JVM 能够执行的字节码文件使用 javac 命令具体格

    2026年3月17日
    2
  • django drf_thinkphp源码分析

    django drf_thinkphp源码分析序列化与反序列化一般后端数据返回给前端的数据格式都是json格式,简单易懂,但是我们使用的语言本身并不是json格式,像我们使用的Python如果直接返回给前端,前端用的javascript语言是识

    2022年7月29日
    10
  • GLM-4.7 + Claude Code 完整配置教程(含 MCP 功能)

    GLM-4.7 + Claude Code 完整配置教程(含 MCP 功能)

    2026年3月16日
    4
  • 不会部署并调试SpringBoot源码?一看必会IDEA操作[通俗易懂]

    不会部署并调试SpringBoot源码?一看必会IDEA操作[通俗易懂]SpringBoot现在这么火几乎是面试必问,如果你能说出点源码是如果实现的,那么面试官跟定对你刮目相看。但是好多同学往往在部署SpringBoot源码的时候,由于找不到门路而选择放弃。本篇博客通过简单方式教你如果将SpringBoot源码导入IDEA并对其进行调试,对核心的代码添加自己注释内容。

    2022年5月20日
    108
  • 【网络流24题】-题表

    【网络流24题】-题表最近都不知道自己在干什么==2016-11-0808:37:35转载于:https://www.cnblogs.com/Konjakmoyu/p/6041412.html

    2022年5月24日
    41
  • informix 初探[转] windows informix[通俗易懂]

    informix 初探[转] windows informix[通俗易懂]informix初探[转]windowsinformixdbaccesshttp://blog.csdn.net/likelynn/archive/2009/02/27/3941680.aspx又找到个入门好文,财富啊财富.转载开始:===========================================================项目需要,接触了一下…

    2022年10月19日
    4

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号