0

I want to make install samba from sources. I type command:

./configure --prefix=/usr/local

But I got error:

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')

Here is the 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

What is the problem, and how do I fix it?

jww
  • 97,681
  • 90
  • 411
  • 885
IneedYOURhelp
  • 17
  • 1
  • 6

3 Answers3

0

If you want to setup samba server on your redhat system then i have an answer.

On samba server follow these steps:

  1. install samba server by using a simple command (epel should be preinstalled):

    yum install samba samba-client
    
  2. manage samba.conf file like

    [file]
    path = /filename
    hosts allow = ip/netmask
    
  3. manage selinux and then start services.

    systemctl restart smb nmb
    
vonaka
  • 913
  • 1
  • 11
  • 23
0

Try this: yum install python-devel

  • 3
    Welcome to Stack Overflow. While this command may answer the question, providing additional context regarding why and/or how this code answers the question improves its long-term value. [How to Answer](https://stackoverflow.com/help/how-to-answer) – Elletlar Mar 20 '19 at 16:56
0

The Samba on RHEL 7 and RHEL 8 do not have domain controller features enabled, there are some awkward dependencies. My RPM building tools are available at:

https://github.com/nkadel/samba4repo/

Samba also now requires python3, not merely python2. RHEL 8 and its varitions do support python3 as the default, which makes compilation simpler.