DSecureMe / vmc-docker

VMC: a Scalable, Open Source and Free Vulnerability Management Platform
https://dsecure.me
Apache License 2.0
15 stars 2 forks source link

make build error #13

Closed veanome closed 1 year ago

veanome commented 1 year ago

When I attempt to run the command "make build" I am reciving the following output/error:

make build                        
docker build -f Dockerfile.vmc-builder --build-arg VMC_VERSION=1.2rc3 -t vmc-builder .
Sending build context to Docker daemon  240.1kB
Step 1/7 : FROM python:3.11.0b1-slim-bullseye
 ---> bbae8919df1c
Step 2/7 : ARG VMC_VERSION=1.2rc3
 ---> Using cache
 ---> 8818a339fa5b
Step 3/7 : ENV VMC_VERSION=${VMC_VERSION}
 ---> Using cache
 ---> 8097ca0d97a9
Step 4/7 : ENV VIRTUAL_ENV=/opt/venv
 ---> Using cache
 ---> a6125901e585
Step 5/7 : RUN python3 -m venv $VIRTUAL_ENV
 ---> Using cache
 ---> 3ee9c94991d9
Step 6/7 : ENV PATH="$VIRTUAL_ENV/bin:$PATH"
 ---> Using cache
 ---> ea0a8f81a28b
Step 7/7 : RUN pip install --upgrade pip;    pip install --no-cache-dir vmcenter==${VMC_VERSION};     python3 -m vmc collectstatic --noinput --clear;
 ---> Running in 6cb53ac06ac5
Requirement already satisfied: pip in /opt/venv/lib/python3.11/site-packages (22.0.4)
Collecting pip
  Downloading pip-23.0-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.6 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.4
    Uninstalling pip-22.0.4:
      Successfully uninstalled pip-22.0.4
Successfully installed pip-23.0
Collecting vmcenter==1.2rc3
  Downloading vmcenter-1.2rc3-py3-none-any.whl (1.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 6.4 MB/s eta 0:00:00
Collecting django==3.2.12
  Downloading Django-3.2.12-py3-none-any.whl (7.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.9/7.9 MB 11.8 MB/s eta 0:00:00
Collecting psycopg2-binary==2.9.3
  Downloading psycopg2-binary-2.9.3.tar.gz (380 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 380.6/380.6 kB 14.2 MB/s eta 0:00:00
  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                                                                                                                                                               
  ╰─> [23 lines of output]                                                                                                                                                     
      running egg_info                                                                                                                                                         
      creating /tmp/pip-pip-egg-info-5kk68gn9/psycopg2_binary.egg-info                                                                                                         
      writing /tmp/pip-pip-egg-info-5kk68gn9/psycopg2_binary.egg-info/PKG-INFO                                                                                                 
      writing dependency_links to /tmp/pip-pip-egg-info-5kk68gn9/psycopg2_binary.egg-info/dependency_links.txt                                                                 
      writing top-level names to /tmp/pip-pip-egg-info-5kk68gn9/psycopg2_binary.egg-info/top_level.txt                                                                         
      writing manifest file '/tmp/pip-pip-egg-info-5kk68gn9/psycopg2_binary.egg-info/SOURCES.txt'                                                                              

      Error: pg_config executable not found.                                                                                                                                   

      pg_config is required to build psycopg2 from source.  Please add the directory                                                                                           
      containing pg_config to the $PATH or specify the full executable path with the                                                                                           
      option:                                                                                                                                                                  

          python setup.py build_ext --pg-config /path/to/pg_config build ...                                                                                                   

      or with the pg_config option in 'setup.cfg'.                                                                                                                             

      If you prefer to avoid building psycopg2 from source, please install the PyPI                                                                                            
      'psycopg2-binary' package instead.                                                                                                                                       

      For further information please check the 'doc/src/install.rst' file (also at                                                                                             
      <https://www.psycopg.org/docs/install.html>).                                                                                                                            

      [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.                                                                                                                                                   
/opt/venv/bin/python3: No module named vmc                                                                                                                                     
The command '/bin/sh -c pip install --upgrade pip;    pip install --no-cache-dir vmcenter==${VMC_VERSION};     python3 -m vmc collectstatic --noinput --clear;' returned a non-zero code: 1
make: *** [Makefile:6: build] Error 1

I've tried reinstalling psycopg2-binary, but that didn't seem to change anything. I am attempting to run this on Kali Linux 2022.04 hosting docker.

mwalkowski commented 1 year ago

Hi @veanome,

Thank you for information. I have updated dependencies in vmc, please try again and let me know if everything works.

veanome commented 1 year ago

Hi @veanome,

Thank you for information. I have updated dependencies in vmc, please try again and let me know if everything works.

That did it! It is now running again. Thanks!