Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc/add requirements when using alpine linux #115

Conversation

Bidaya0
Copy link
Contributor

@Bidaya0 Bidaya0 commented Feb 11, 2022

To fix situtation like this when using alpine-linux

 ---> Running in 7a62fc060102
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  557k  100  557k    0     0   137k      0  0:00:04  0:00:04 --:--:--  137k
Processing /tmp/dongtai-agent-python.tar.gz
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting psutil>=5.8.0
  Downloading psutil-5.9.0.tar.gz (478 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 478.3/478.3 KB 516.5 kB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: requests>=2.25.1 in /usr/local/lib/python3.8/site-packages (from dongtai-agent-python==1.3.0) (2.26.0)
Requirement already satisfied: pip>=19.2.3 in /usr/local/lib/python3.8/site-packages (from dongtai-agent-python==1.3.0) (22.0.3)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/site-packages (from requests>=2.25.1->dongtai-agent-python==1.3.0) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/site-packages (from requests>=2.25.1->dongtai-agent-python==1.3.0) (2021.10.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/site-packages (from requests>=2.25.1->dongtai-agent-python==1.3.0) (1.26.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.8/site-packages (from requests>=2.25.1->dongtai-agent-python==1.3.0) (2.0.11)
Building wheels for collected packages: dongtai-agent-python, psutil
  Building wheel for dongtai-agent-python (setup.py): started
  Building wheel for dongtai-agent-python (setup.py): finished with status 'done'
  Created wheel for dongtai-agent-python: filename=dongtai_agent_python-1.3.0-cp38-cp38-linux_x86_64.whl size=688248 sha256=e6b585220cfc43fc59011edd985f90f0a363f0ecddade3abaefd17a6be9c19df
  Stored in directory: /root/.cache/pip/wheels/6d/7c/ac/1e762d162bab046ec5f2597df87ff2c810748a0724785f43da
  Building wheel for psutil (setup.py): started
  Building wheel for psutil (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [52 lines of output]
      /tmp/tmpxs22m167.c:1:10: fatal error: linux/ethtool.h: No such file or directory
          1 | #include <linux/ethtool.h>
            |          ^~~~~~~~~~~~~~~~~
      compilation terminated.
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/psutil
      copying psutil/_psosx.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_psaix.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_psposix.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_compat.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_common.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/__init__.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.8/psutil
      creating build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_testutils.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_memleaks.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.8/psutil/tests
      warning: build_py: byte-compiling is disabled, skipping.
      
      running build_ext
      building 'psutil._psutil_linux' extension
      creating build/temp.linux-x86_64-3.8
      creating build/temp.linux-x86_64-3.8/psutil
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=590 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/include/python3.8 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.8/psutil/_psutil_common.o
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=590 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/include/python3.8 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-3.8/psutil/_psutil_posix.o
      psutil/_psutil_posix.c:30:14: fatal error: linux/types.h: No such file or directory
         30 |     #include <linux/types.h>
            |              ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command 'gcc' failed with exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psutil
  Running setup.py clean for psutil
Successfully built dongtai-agent-python
Failed to build psutil
Installing collected packages: psutil, dongtai-agent-python
  Running setup.py install for psutil: started
  Running setup.py install for psutil: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Running setup.py install for psutil did not run successfully.
  │ exit code: 1
  ╰─> [52 lines of output]
      /tmp/tmpy7wa524z.c:1:10: fatal error: linux/ethtool.h: No such file or directory
          1 | #include <linux/ethtool.h>
            |          ^~~~~~~~~~~~~~~~~
      compilation terminated.
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/psutil
      copying psutil/_psosx.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_psaix.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_psposix.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_compat.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_common.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/__init__.py -> build/lib.linux-x86_64-3.8/psutil
      copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.8/psutil
      creating build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_testutils.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_memleaks.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.8/psutil/tests
      copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.8/psutil/tests
      warning: build_py: byte-compiling is disabled, skipping.
      
      running build_ext
      building 'psutil._psutil_linux' extension
      creating build/temp.linux-x86_64-3.8
      creating build/temp.linux-x86_64-3.8/psutil
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=590 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/include/python3.8 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.8/psutil/_psutil_common.o
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=590 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/include/python3.8 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-3.8/psutil/_psutil_posix.o
      psutil/_psutil_posix.c:30:14: fatal error: linux/types.h: No such file or directory
         30 |     #include <linux/types.h>
            |              ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command 'gcc' failed with exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> psutil

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

@lostsnow lostsnow merged commit 4e437b2 into HXSecurity:master Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants