gpt4 book ai didi

python - 如何配置和编译Samba?

转载 作者:太空宇宙 更新时间:2023-11-04 12:15:31 30 4
gpt4 key购买 nike

我想从源代码安装 samba。我输入命令:

./configure --prefix=/usr/local

但是我得到了错误:

Checking for library python2.7 : not found 
Checking for library python2.7 : not found
Checking for library python27 : not found
Checking for program python2.7-config : not found
Checking for program python-config-2.7 : not found
Checking for custom code : Could not find the python development headers
/home/fv1/Pobrane/samba/wscript:121:
error: the configuration failed (see '/home/fv1/Pobrane/samba/bin/config.log')

这是config.log:

<==
[1/2] Compiling test.c
../test.c:2:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
['/usr/bin/gcc', '-MD', '-fno-strict-aliasing', '-I/usr/local/include', '-I/usr/include/python2.7', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '../test.c', '-c', '-o', 'default/test_1.o']
command returned 'Build failed: -> task failed (err #1): \n\t{task: cc test.c -> test_1.o}'Could not find the python development headers

问题是什么,我该如何解决?

最佳答案

如果你想在你的 redhat 系统上设置 samba 服务器,那么我有一个答案。

在 samba 服务器上执行以下步骤:

  1. 使用简单的命令安装 samba 服务器(epel 应该预装):

    yum install samba samba-client
  2. 像管理 samba.conf 文件一样

    [file]
    path = /filename
    hosts allow = ip/netmask
  3. 管理 selinux,然后启动服务。

    systemctl restart smb nmb

关于python - 如何配置和编译Samba?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47542282/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com