RhinoSecurityLabs / cloudgoat

CloudGoat is Rhino Security Labs' "Vulnerable by Design" AWS deployment tool
BSD 3-Clause "New" or "Revised" License
2.88k stars 598 forks source link

Installing requirements error. #207

Closed researcher111 closed 11 months ago

researcher111 commented 1 year ago

getting this error when trying to install the requirements.

`(kali㉿kali)-[~/cloudgoat] └─$ sudo pip3 install -r ./requirements.txt

Collecting argcomplete==1.10.0 (from -r ./requirements.txt (line 5)) Using cached argcomplete-1.10.0-py2.py3-none-any.whl (31 kB) Collecting PyYAML==5.4 (from -r ./requirements.txt (line 6)) Using cached PyYAML-5.4.tar.gz (174 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [68 lines of output] /tmp/pip-build-env-h1mweglb/overlay/local/lib/python3.11/dist-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in setup.cfg !!

          ********************************************************************************
          The license_file parameter is deprecated, use license_files instead.

          By 2023-Oct-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.

          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************

  !!
    parsed = self.parsers.get(option_name, lambda x: x)(value)
  running egg_info
  writing lib3/PyYAML.egg-info/PKG-INFO
  writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
  writing top-level names to lib3/PyYAML.egg-info/top_level.txt
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>`
manasmbellani commented 1 year ago

Hi @researcher111 Try to increment the pyyaml version to the latest one in requirements.txt and run the pip install command again e.g. PyYAML==6.0

eisenrah commented 1 year ago

Hi! Got the same error as @researcher111 when trying on 6.3.0-kali1-arm64. Happy to announce that bumping the version of PyYAML to 6.0 works for me. Thanks @manasmbellani!

However, when I run pip install again, I get warnings that CloudGoat wants argcomplete 1.10.0 installed but censys 2.2.4 (which is present on Kali linux for some reason) wants argcomplete version between 2.0.0 and 4.0.0. Full output:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.                                                                            
censys 2.2.4 requires argcomplete<4.0.0,>=2.0.0, but you have argcomplete 1.10.0 which is incompatible.                      
censys 2.2.4 requires requests>=2.29.0, but you have requests 2.26.0 which is incompatible.                                  
crackmapexec 5.4.0 requires aioconsole<0.4.0,>=0.3.3, but you have aioconsole 0.3.1 which is incompatible.                   
crackmapexec 5.4.0 requires minikerberos==0.3.3, but you have minikerberos 0.4.0 which is incompatible.                      
crackmapexec 5.4.0 requires neo4j<5.0.0,>=4.1.1, but you have neo4j 5.2.dev0 which is incompatible.                          
crackmapexec 5.4.0 requires pypsrp<0.8.0,>=0.7.0, but you have pypsrp 0.8.1 which is incompatible.                           
crackmapexec 5.4.0 requires requests>=2.27.1, but you have requests 2.26.0 which is incompatible.                            
crackmapexec 5.4.0 requires xmltodict<0.13.0,>=0.12.0, but you have xmltodict 0.13.0 which is incompatible.

To get rid of this, I installed CloudGoat in a Python virtual environment, avoiding conflicts with system-wide packages:

sudo apt install python3.11-venv
python3 -m venv cloudgoat-env
source cloudgoat-env/bin/activate
pip3 install -r ./requirements.txt
ninja0x18 commented 1 year ago

The above workaround worked well. Thank you!

jdearmas commented 11 months ago

This was fixed in commit a310494.