想安装UE4+AirSim进行仿真,奈何就UE4安装了几天也安装不上,记录以下自己的解决办法。
安装在最后的make时,出现下面的错误。
Tool/Private/BaseParser.cpp:3:
In file included from Programs/UnrealHeaderTool/Private/BaseParser.h:5:
In file included from Runtime/Core/Public/CoreMinimal.h:9:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:139:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: 'bits/types/sig_atomic_t.h' file not found
/usr/include/signal.h:32:10: fatal error: 'bits/types/sig_atomic_t.h' file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
1 error generated.
1 error generated.
1 error generated.
1 error generated.
1 error generated.
make: *** [Makefile:387:CrashReportClient-Linux-Shipping] 错误 6
解决办法如下:
sudo apt-get install build-essential flex libelf-dev libc6-dev-amd64 binutils-dev libdwarf-dev
然而,部分人可能还是出现错误,如下:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
build-essential 已经是最新版 (12.8ubuntu1)。
flex 已经是最新版 (2.6.4-6.2)。
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:
下列软件包有未满足的依赖关系:
binutils-dev : 依赖: binutils (= 2.34-6ubuntu1.9) 但是它将不会被安装
build-essential : 依赖: gcc (>= 4:9.2) 但是它将不会被安装
依赖: g++ (>= 4:9.2) 但是它将不会被安装
依赖: dpkg-dev (>= 1.17.11) 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。
此时,执行:
sudo apt-get install binutils
然后再执行上面的:sudo apt-get install build-essential flex libelf-dev libc6-dev-amd64 binutils-dev libdwarf-dev就可以了。
最后再make就行了