在Windows中为安装MobSF生成lief时出错

2024-05-13 14:07:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我无法在Windows 10中安装MobSF,因为bulid lief时出错。我已经在笔记本电脑上安装了python 3.8。 我的安装中有错误

**Running setup.py install for lief ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\CTI\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CTI\\AppData\\Local\\Temp\\pip-install-ks8755du\\lief_3404ee98b1ef45c9a9780275fba1c784\\setup.py'"'"'; __file__='"'"'C:\\Users\\CTI\\AppData\\Local\\Temp\\pip-install-ks8755du\\lief_3404ee98b1ef45c9a9780275fba1c784\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CTI\AppData\Local\Temp\pip-record-cjp9pgsa\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\CTI\AppData\Local\Programs\Python\Python38\Include\lief'
         cwd: C:\Users\CTI\AppData\Local\Temp\pip-install-ks8755du\lief_3404ee98b1ef45c9a9780275fba1c784\
    Complete output (87 lines):
    0.10.1
    running install
    running build
    running build_ext
    cmake C:\Users\CTI\AppData\Local\Temp\pip-install-ks8755du\lief_3404ee98b1ef45c9a9780275fba1c784 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\CTI\AppData\Local\Temp\pip-install-ks8755du\lief_3404ee98b1ef45c9a9780275fba1c784\build\temp.win-amd64-3.8 -DPYTHON_EXECUTABLE=C:\Users\CTI\AppData\Local\Programs\Python\Python38\python.exe -DLIEF_PYTHON_API=on -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\CTI\AppData\Local\Temp\pip-install-ks8755du\lief_3404ee98b1ef45c9a9780275fba1c784\build\temp.win-amd64-3.8 -DLIEF_USE_CRT_RELEASE=MT -A x64
    -- Building for: Visual Studio 16 2019
    -- LIEF_CRT: /MT
    -- Using Release VC++ CRT: MT
    -- Could NOT find cppcheck (missing: CPPCHECK_EXECUTABLE CPPCHECK_POSSIBLEERROR_ARG CPPCHECK_UNUSEDFUNC_ARG CPPCHECK_STYLE_ARG CPPCHECK_INCLUDEPATH_ARG CPPCHECK_QUIET_ARG)
    -- The C compiler identification is MSVC 19.28.29335.0
    -- The CXX compiler identification is MSVC 19.28.29335.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- LIEF 0.10.0
    -- ccache: ON
    -- Enable JSON support
    -- Enable Frozen (C++14 support)
    -- Number of parallel compiler jobs set to /MP
    -- Could NOT find cppcheck (missing: CPPCHECK_EXECUTABLE CPPCHECK_POSSIBLEERROR_ARG CPPCHECK_UNUSEDFUNC_ARG CPPCHECK_STYLE_ARG CPPCHECK_INCLUDEPATH_ARG CPPCHECK_QUIET_ARG)
    -- Configuration Types: Debug;Release;MinSizeRel;RelWithDebInfo
    -- Build Types: Release
    -- Found PythonInterp: C:/Users/CTI/AppData/Local/Programs/Python/Python38/python.exe (found suitable version "3.8.7", minimum required is "3.5")
    -- Found PythonLibs: C:/Users/CTI/AppData/Local/Programs/Python/Python38/libs/Python38.lib
    -- Python version: 3.5
    -- Python lib:     C:/Users/CTI/AppData/Local/Programs/Python/Python38/libs/Python38.lib
    -- Python include: C:/Users/CTI/AppData/Local/Programs/Python/Python38/include
    -- Python interpreter: C:/Users/CTI/AppData/Local/Programs/Python/Python38/python.exe
    -- Performing Test C_SUPPORTS_NO_MACRO_REDEFINED
    -- Performing Test C_SUPPORTS_NO_MACRO_REDEFINED - Failed
    -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED
    -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED - Failed
    -- Performing Test C_SUPPORTS_NO_DEPRECATED_DECLARATIONS
    -- Performing Test C_SUPPORTS_NO_DEPRECATED_DECLARATIONS - Failed
    -- Performing Test CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS
    -- Performing Test CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS - Failed
    -- Performing Test HAS_ANSI
    -- Performing Test HAS_ANSI - Failed
    CMake Error at CMakeLists.txt:541 (add_subdirectory):
      add_subdirectory given source
      "C:/Users/CTI/AppData/Local/Temp/pip-install-ks8755du/lief_3404ee98b1ef45c9a9780275fba1c784/package"
      which is not an existing directory.
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/CTI/AppData/Local/Temp/pip-install-ks8755du/lief_3404ee98b1ef45c9a9780275fba1c784/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/CTI/AppData/Local/Temp/pip-install-ks8755du/lief_3404ee98b1ef45c9a9780275fba1c784/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeError.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\CTI\AppData\Local\Temp\pip-install-ks8755du\lief_3404ee98b1ef45c9a9780275fba1c784\setup.py", line 363, in <module>
        setup(
      File "C:\Users\CTI\AppData\Roaming\Python\Python38\site-packages\setuptools\__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\CTI\AppData\Roaming\Python\Python38\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\CTI\AppData\Local\Temp\pip-install-ks8755du\lief_3404ee98b1ef45c9a9780275fba1c784\setup.py", line 78, in run
        self.build_extension(ext)
      File "C:\Users\CTI\AppData\Local\Temp\pip-install-ks8755du\lief_3404ee98b1ef45c9a9780275fba1c784\setup.py", line 202, in build_extension
        subprocess.check_call(configure_cmd, cwd=self.build_temp, env=env)
      File "C:\Users\CTI\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\CTI\\AppData\\Local\\Temp\\pip-install-ks8755du\\lief_3404ee98b1ef45c9a9780275fba1c784', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\CTI\\AppData\\Local\\Temp\\pip-install-ks8755du\\lief_3404ee98b1ef45c9a9780275fba1c784\\build\\temp.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\\Users\\CTI\\AppData\\Local\\Programs\\Python\\Python38\\python.exe', '-DLIEF_PYTHON_API=on', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\CTI\\AppData\\Local\\Temp\\pip-install-ks8755du\\lief_3404ee98b1ef45c9a9780275fba1c784\\build\\temp.win-amd64-3.8', '-DLIEF_USE_CRT_RELEASE=MT', '-A', 'x64']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\CTI\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CTI\\AppData\\Local\\Temp\\pip-install-ks8755du\\lief_3404ee98b1ef45c9a9780275fba1c784\\setup.py'"'"'; __file__='"'"'C:\\Users\\CTI\\AppData\\Local\\Temp\\pip-install-ks8755du\\lief_3404ee98b1ef45c9a9780275fba1c784\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CTI\AppData\Local\Temp\pip-record-cjp9pgsa\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\CTI\AppData\Local\Programs\Python\Python38\Include\lief' Check the logs for full command output.**

请帮我修一下


Tags: installpiprunpylocalusersappdatatemp