thingsboard gateway 编译报错

这篇具有很好参考价值的文章主要介绍了thingsboard gateway 编译报错。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

以下记录是处理过程, 最终解决办法在最后有写哦, 主要思路即解决grpcio安装问题      

During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\HUAWEI\AppData\Local\Temp\pip-install-9l7w5f0l\grpcio_1a5875cb655943c08af0e49641be4521\src\python\grpcio\commands.py", line 285, in build_extensions
          build_ext.build_ext.build_extensions(self)
        File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
          _build_ext.build_ext.build_extensions(self)
        File "C:\Users\HUAWEI\.conda\envs\gw\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "C:\Users\HUAWEI\.conda\envs\gw\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "C:\Users\HUAWEI\.conda\envs\gw\lib\site-packages\setuptools\command\build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "C:\Users\HUAWEI\.conda\envs\gw\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
        File "C:\Users\HUAWEI\.conda\envs\gw\lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 428, in compile
          raise CompileError(msg)
      distutils.errors.CompileError: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for grpcio
  Running setup.py clean for grpcio
Failed to build grpcio
ERROR: Could not build wheels for grpcio, which is required to install pyproject.toml-based projects

解决办法:

python.exe -m pip install --user --upgrade pip

pip install --user --upgrade setuptools

pip3 install --no-cache-dir --force-reinstall -Iv grpcio==1.40.0

遇到报错

ERROR: Could not build wheels for grpcio, which is required to install pyproject.toml-based projects

具体错误

   C:\Users\HUAWEI\AppData\Local\Temp\pip-install-e7nx97h2\grpcio_2ccb5f40ca594c3eaf16c86220c7a967\src\core\ext\upb-generated\envoy\extensions\filters\network\http_connection_manager\v3\http_connection_manager.upb.c : fatal error C1083: 无法打开编译器生成的文件: “”: Invalid argument
  creating Users
  creating Users\HUAWEI
  creating Users\HUAWEI\AppData
  creating Users\HUAWEI\AppData\Local
  creating Users\HUAWEI\AppData\Local\Temp
  creating Users\HUAWEI\AppData\Local\Temp\tmp705lwr46
  "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\HUAWEI\.conda\envs\gw\include -IC:\Users\HUAWEI\.conda\envs\gw\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcC:\Users\HUAWEI\AppData\Local\Temp\tmp705lwr46\a.c /FoUsers\HUAWEI\AppData\Local\Temp\tmp705lwr46\a.obj
  a.c
  Traceback (most recent call last):
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\_msvccompiler.py", line 529, in _fallback_spawn
      yield bag
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\_msvccompiler.py", line 517, in spawn
      return super().spawn(cmd, env=env)
  TypeError: _commandfile_spawn() got an unexpected keyword argument 'env'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\_msvccompiler.py", line 419, in compile
      self.spawn(args)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\_msvccompiler.py", line 516, in spawn
      with self._fallback_spawn(cmd, env) as fallback:
    File "C:\Users\HUAWEI\.conda\envs\gw\lib\contextlib.py", line 153, in __exit__
      self.gen.throw(typ, value, traceback)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\_msvccompiler.py", line 537, in _fallback_spawn
      bag.value = super().spawn(cmd)
    File "C:\Users\HUAWEI\AppData\Local\Temp\pip-install-e7nx97h2\grpcio_2ccb5f40ca594c3eaf16c86220c7a967\src\python\grpcio\_spawn_patch.py", line 54, in _commandfile_spawn
      _classic_spawn(self, command)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\ccompiler.py", line 1041, in spawn
      spawn(cmd, dry_run=self.dry_run, **kwargs)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\spawn.py", line 70, in spawn
      raise DistutilsExecError(
  distutils.errors.DistutilsExecError: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\HUAWEI\AppData\Local\Temp\pip-install-e7nx97h2\grpcio_2ccb5f40ca594c3eaf16c86220c7a967\src\python\grpcio\commands.py", line 285, in build_extensions
      build_ext.build_ext.build_extensions(self)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
      _build_ext.build_ext.build_extensions(self)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\command\build_ext.py", line 246, in build_extension
      _build_ext.build_extension(self, ext)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\command\build_ext.py", line 548, in build_extension
      objects = self.compiler.compile(
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\_msvccompiler.py", line 421, in compile
      raise CompileError(msg)
  distutils.errors.CompileError: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\HUAWEI\AppData\Local\Temp\pip-install-e7nx97h2\grpcio_2ccb5f40ca594c3eaf16c86220c7a967\setup.py", line 524, in <module>
      setuptools.setup(
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\dist.py", line 1234, in run_command
      super().run_command(command)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\HUAWEI\.conda\envs\gw\lib\site-packages\wheel\bdist_wheel.py", line 325, in run
      self.run_command("build")
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\dist.py", line 1234, in run_command
      super().run_command(command)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\dist.py", line 1234, in run_command
      super().run_command(command)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\command\build_ext.py", line 84, in run
      _build_ext.run(self)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
    File "C:\Users\HUAWEI\AppData\Local\Temp\pip-install-e7nx97h2\grpcio_2ccb5f40ca594c3eaf16c86220c7a967\src\python\grpcio\commands.py", line 289, in build_extensions
      raise CommandError(
  commands.CommandError: Failed `build_ext` step:
  Traceback (most recent call last):
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\_msvccompiler.py", line 529, in _fallback_spawn
      yield bag
    File "C:\Users\HUAWEI\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\_msvccompiler.py", line 517, in spawn
      return super().spawn(cmd, env=env)
  TypeError: _commandfile_spawn() got an unexpected keyword argument 'env'

分析原因: 看到错误日志里面 有C:\Users\HUAWEI\AppData\Roaming\Python\Python310 , 这个是python 3.10 版本的, 而我使用conda创建了新的环境

conda create --name gw python=3.10

所以不应该出现以前的旧的 python310的路径, 从环境变量里面PATH找到对应的 Python310, 删除之, 重新编译仍然报错, 在设置-> 应用里面找到所有Python安装软件 卸载, 只保留conda

仍然报错, 换环境, 换成python=3.11

仍然报错

核心报错: 

 return super().spawn(cmd, env=env)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      TypeError: _commandfile_spawn() got an unexpected keyword argument 'env'

查到如下issue

https://github.com/pypa/distutils/issues/15

尝试解决办法

set SETUPTOOLS_USE_DISTUTILS=stdlib

接着install

pip install -r requirements.txt

报新的错误

修改 setuptools 版本 setuptools<=49.1.2

仍然不行

按官方文档 [IoT Gateway installation from sources. | ThingsBoard IoT Gateway], 使用ubuntu编译仍然报错

x-x86_64-cpython-311/src/core/ext/xds/xds_client_stats.o -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions -pthread
      cc1plus: warning: command-line option ‘-std=gnu99’ is valid for C/ObjC but not for C++
      creating None
      creating None/tmp
      creating None/tmp/tmpszwkvkw9
      gcc -pthread -B /home/gaosong/anaconda3/envs/gw/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/gaosong/anaconda3/envs/gw/include -fPIC -O2 -isystem /home/gaosong/anaconda3/envs/gw/include -fPIC -I/home/gaosong/anaconda3/envs/gw/include/python3.11 -c /tmp/tmpszwkvkw9/a.c -o None/tmp/tmpszwkvkw9/a.o
      Traceback (most recent call last):
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile
          self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/_spawn_patch.py", line 54, in _commandfile_spawn
          _classic_spawn(self, command)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
          spawn(cmd, dry_run=self.dry_run, **kwargs)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn
          raise DistutilsExecError(
      distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/commands.py", line 285, in build_extensions
          build_ext.build_ext.build_extensions(self)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
                    ^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/_parallel_compile_patch.py", line 58, in _parallel_compile
          multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/multiprocessing/pool.py", line 367, in map
          return self._map_async(func, iterable, mapstar, chunksize).get()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/multiprocessing/pool.py", line 774, in get
          raise self._value
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/multiprocessing/pool.py", line 125, in worker
          result = (True, func(*args, **kwds))
                          ^^^^^^^^^^^^^^^^^^^
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
          return list(map(*args))
                 ^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
          self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile
          raise CompileError(msg)
      distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/setup.py", line 524, in <module>
          setuptools.setup(
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command
          super().run_command(command)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 325, in run
          self.run_command("build")
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command
          super().run_command(command)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command
          super().run_command(command)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/commands.py", line 289, in build_extensions
          raise CommandError(
      commands.CommandError: Failed `build_ext` step:
      Traceback (most recent call last):
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile
          self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/_spawn_patch.py", line 54, in _commandfile_spawn
          _classic_spawn(self, command)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
          spawn(cmd, dry_run=self.dry_run, **kwargs)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn
          raise DistutilsExecError(
      distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/commands.py", line 285, in build_extensions
          build_ext.build_ext.build_extensions(self)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
                    ^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/_parallel_compile_patch.py", line 58, in _parallel_compile
          multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/multiprocessing/pool.py", line 367, in map
          return self._map_async(func, iterable, mapstar, chunksize).get()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/multiprocessing/pool.py", line 774, in get
          raise self._value
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/multiprocessing/pool.py", line 125, in worker
          result = (True, func(*args, **kwds))
                          ^^^^^^^^^^^^^^^^^^^
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
          return list(map(*args))
                 ^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-ko5bvn1_/grpcio_4478e5e74c1d43f28fb1b34159afc4a0/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
          self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
        File "/home/gaosong/anaconda3/envs/gw/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile
          raise CompileError(msg)
      distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for grpcio
  Running setup.py clean for grpcio
Failed to build grpcio
ERROR: Could not build wheels for grpcio, which is required to install pyproject.toml-based projects

问题主要出在grpcio的编译上面

最终解决办法:

将grpcio版本去掉,使用最新版本,

即由 grpcio==1.40.0 改成 grpcio文章来源地址https://www.toymoban.com/news/detail-577810.html

到了这里,关于thingsboard gateway 编译报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 设备通过thingsboard iot gateway 来获取属性和更新属性

    此部分中的配置是可选的。 为了向ThingsBoard服务器节点请求客户端或共享设备属性,网关允许发送属性请求。 属性 默认值 描述 retain false 如果设置为true,该消息将被设置为主题的“最后已知良好”/保留消息。 topicFilter v1/devices/me/attributes/request 属性请求的主题 deviceNameJsonE

    2024年02月12日
    浏览(47)
  • ThingsBoard Gateway:物联网设备数据采集与集成的强大解决方案

    随着物联网(IoT)技术的不断发展,越来越多的设备被接入到网络中。这些设备产生的大量数据对于企业、工程师以及普通用户来说具有极高的价值。然而,如何将这些数据有效地采集、整合并处理,却成为了一个巨大的挑战。为了解决这一问题,我们向您推荐一个强大的开

    2024年02月15日
    浏览(39)
  • Thingsboard3.4.2编译遇到“digital envelope routines::unsupported run build:prod thingsboard”错误的解决方法

    Thingsboard 编译时 Web UI 报错:digital envelope routines::unsupported,node版本v18.12.1,在网上查询了解决方法,记录下 1、原因: node.js 的版本问题 因为 node.js V17版本中最近发布的OpenSSL3.0, 而OpenSSL3.0对允许算法和密钥大小增加了严格的限制,可能会对生态系统造成一些影响。故此以前

    2024年02月12日
    浏览(522)
  • 502 bad gateway报错

    代码在本地运行可以正常访问后端接口,部署服务器报错502。直接检查防火墙状态是否开启,先关闭防火墙试一下。如果是防火墙的原因在打开防火墙,开放需要的端口即可。 1、先查看防火墙状态: 2、停止防火墙: 3、启动防火墙: 4、开放端口号: 创作不易,大家帮忙关

    2024年02月14日
    浏览(36)
  • 502 Bad GateWay报错的解决方法

    什么是502 bad gateway 报错  简单来说 502 是报错类型代码 bad gateway 错误的网关。是Web服务器作为网关或代理服务器时收到无效的响应。 用我们的口语说就是运行网站的服务器暂时挂了(不响应)。 产生错误的原因 1.连接超时 我们向服务器发送请求 由于服务器当前链接太多,导致

    2024年02月15日
    浏览(45)
  • 在spring cloud中使用gateway报错404(踩坑)

    在我写一个spring cloud小demo时,在浏览器访问报错中报错404,让我百思不得其解,    以下是错误代码展示 teacher业务 teacher配置文件 gateway配置文件 在上述gateway配置文件中出现的错误 - Path=/teacherserver/** 正确是应该是 -Path=/teacher/** Path应该与controller对应 当然,这是我粗心大意

    2024年02月04日
    浏览(46)
  • 宝塔反向代理后报错:502 Bad Gateway nginx

    我应该跟这个问题差不多,解决方案也来自这里: 在反代的时候没有强制指定SSL协议,导致SSL握手失败,在反代配置中添加上相关的配置就好:

    2024年02月12日
    浏览(48)
  • 在gateway中使用openfeign时,项目启动不了也不报错

    升级spring boot到2.7.0,gateway先启动其他微服务,在启动网关,网关启动不了,但是网关也没有任何异常日志,仅仅是一直等待状态,查看nacos服务未正常注册;先启动网关,所有服务能正常启动,产看nacos服务,所有服务能正常注册。 最终发现是Feign导致, Spring Cloud Gateway使用

    2024年02月09日
    浏览(61)
  • 【解决】访问网关gateway报错,“status“:503,“error“: “Service Unavailable“

    问题排查 检查需要路由的服务实例是否成功被注册到 注册中心 ,出现503的情况,大部分都是这里除了问题。 检查网关路由配置 为了确定网关的配置正确无误,找到请求进入网关的入口方法和GatewayAutoConfiguration对象,并打上断点。 发现请求能够顺利进入网关,并且配置文件

    2024年02月11日
    浏览(65)
  • Gateway 根据服务名路由失败,报错 Service Unavailable, status=503

    我的SpringBoot版本为2.6.6,本篇文章对于跟我差不多版本的同学应该都适用。 使用gateway+nacos,yaml配置如下,这里使用的是服务名称进行转发: pom文件如下: 然后就出现了服务无法访问的情况,一直报错 This application has no configured error view, so you are seeing this as a fallback. Wed May

    2023年04月08日
    浏览(45)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包