如何配置和编译Samba?

时间:2017-11-28 22:52:23

标签: python linux fedora samba

我想从源代码安装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

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

2 个答案:

答案 0 :(得分:0)

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

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

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

    dtr_params = {'max_depth':np.arange(1,11), 
                  'max_leaf_nodes': list(np.arange(2,60,2)),
                  'min_samples_leaf': np.arange(1,6)}
    
    dtr_grid = GridSearchCV(DecisionTreeRegressor(random_state=5), dtr_params, verbose=1, 
                           n_jobs=-1, cv=KFold(n_splits=5, shuffle=True, random_state=45))
    
    dtr_grid.fit(X_train_ss, y_train_ss)
    
  2. 管理samba.conf文件之类的

    yum install samba samba-client
    
  3. 管理selinux,然后启动服务。

    [file]
    path = /filename
    hosts allow = ip/netmask
    

答案 1 :(得分:0)

尝试一下: yum install python-devel