knadh / tg-archive

A tool for exporting Telegram group chats into static websites like mailing list archives.
MIT License
829 stars 121 forks source link

error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory #123

Closed kenorb closed 7 months ago

kenorb commented 7 months ago
$ pip3 install tg-archive
Defaulting to user installation because normal site-packages is not writeable
Collecting tg-archive
  Using cached tg_archive-1.1.3-py3-none-any.whl
Collecting cryptg==0.2.post2
...
Building wheels for collected packages: cryptg
  Building wheel for cryptg (setup.py) ... error
  error: subprocess-exited-with-error

  Ã python setup.py bdist_wheel did not run successfully.
  â exit code: 1
  â°â> [18 lines of output]
      Couldn't find 'stdint.h'
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.10
      creating build/lib.linux-x86_64-3.10/cryptg
      copying cryptg/__init__.py -> build/lib.linux-x86_64-3.10/cryptg
      running build_ext
      generating cffi module 'build/temp.linux-x86_64-3.10/_tinyaes_with_ige.c'
      creating build/temp.linux-x86_64-3.10
      building '_tinyaes_with_ige' extension
      creating build/temp.linux-x86_64-3.10/build
      creating build/temp.linux-x86_64-3.10/build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/share
      creating build/temp.linux-x86_64-3.10/share/tiny-AES-c
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c build/temp.linux-x86_64-3.10/_tinyaes_with_ige.c -o build/temp.linux-x86_64-3.10/build/temp.linux-x86_64-3.10/_tinyaes_with_ige.o
      error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cryptg
  Running setup.py clean for cryptg
Failed to build cryptg
Installing collected packages: cryptg, tg-archive
  Running setup.py install for cryptg ... error
  error: subprocess-exited-with-error

  Ã Running setup.py install for cryptg did not run successfully.
  â exit code: 1
  â°â> [20 lines of output]
      Couldn't find 'stdint.h'
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.10
      creating build/lib.linux-x86_64-3.10/cryptg
      copying cryptg/__init__.py -> build/lib.linux-x86_64-3.10/cryptg
      running build_ext
      generating cffi module 'build/temp.linux-x86_64-3.10/_tinyaes_with_ige.c'
      creating build/temp.linux-x86_64-3.10
      building '_tinyaes_with_ige' extension
      creating build/temp.linux-x86_64-3.10/build
      creating build/temp.linux-x86_64-3.10/build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/share
      creating build/temp.linux-x86_64-3.10/share/tiny-AES-c
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c build/temp.linux-x86_64-3.10/_tinyaes_with_ige.c -o build/temp.linux-x86_64-3.10/build/temp.linux-x86_64-3.10/_tinyaes_with_ige.o
      error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
      [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.
â°â> cryptg

Ubuntu 22.04.3 LTS

kenorb commented 7 months ago

Fixed by:

sudo apt-get install build-essential