A dependency is missing to build crackmapexec from source.
poetry install will fail with an error :
$ poetry install
Installing dependencies from lock file
Package operations: 17 installs, 0 updates, 0 removals
• Installing gssapi (1.7.3): Failed
EnvCommandError
Command ['/home/olivier/.cache/pypoetry/virtualenvs/crackmapexec-xfVoKL6U-py3.8/bin/pip', 'install', '--no-deps', 'file:///home/olivier/.cache/pypoetry/artifacts/fe/e7/bb/9f1204d0e49af95bc7a0ada1f736a5c11f49bf9aba42382d749949fb45/gssapi-1.7.3.tar.gz'] errored with the following return code 1, and output:
Processing /home/olivier/.cache/pypoetry/artifacts/fe/e7/bb/9f1204d0e49af95bc7a0ada1f736a5c11f49bf9aba42382d749949fb45/gssapi-1.7.3.tar.gz
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
/bin/sh: 1: krb5-config: not found
In distributed package, building from C files...
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-8zs1n909/setup.py", line 128, in <module>
link_args = shlex.split(get_output(f"{kc} --libs gssapi"))
File "/tmp/pip-req-build-8zs1n909/setup.py", line 41, in get_output
res = subprocess.check_output(*args, shell=True, **kwargs)
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'krb5-config --libs gssapi' returned non-zero exit status 127.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
at ~/.poetry/lib/poetry/utils/env.py:1195 in _run
1191│ output = subprocess.check_output(
1192│ cmd, stderr=subprocess.STDOUT, **kwargs
1193│ )
1194│ except CalledProcessError as e:
→ 1195│ raise EnvCommandError(e, input=input_)
1196│
1197│ return decode(output)
1198│
1199│ def execute(self, bin, *args, **kwargs):
Add the following dependency libkrb5-dev to fix the issue :
A dependency is missing to build crackmapexec from source.
poetry install will fail with an error :
Add the following dependency
libkrb5-dev
to fix the issue :Crackmapexec info