尝试在全新安装的 Ubuntu 20.04 上安装 Watchman for React Native。
我正在使用以下步骤(但如果有更好的方法 - 或者如果你可以完全避免使用 Watchman,我很想听听)......
git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1
cd watchman/
git checkout
./autogen.sh
./configure --without-python --without-pcre --enable-lenient
make
我在“制作”步骤中收到如下所示的错误。
我已经看到了许多与构建守望者相关 的 问题,但我还没有看到这种情况。
tests/integration/cppclient.cpp: In function ‘int main(int, char**)’:
tests/integration/cppclient.cpp:114:12: error: ‘TimedOut’ does not name a type
114 | } catch(TimedOut& e) {
| ^~~~~~~~
tests/integration/cppclient.cpp:120:12: error: ‘TimedOut’ does not name a type
120 | } catch(TimedOut& e) {
| ^~~~~~~~
tests/integration/cppclient.cpp:25:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
25 | system("rm -f hit");
| ~~~~~~^~~~~~~~~~~~~
tests/integration/cppclient.cpp:75:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
75 | system("touch hit");
| ~~~~~~^~~~~~~~~~~~~
tests/integration/cppclient.cpp:88:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
88 | system("rm hit");
| ~~~~~~^~~~~~~~~~
make[1]: *** [Makefile:2766: tests/integration/cppclient_t-cppclient.o] Error 1
make[1]: Leaving directory '/home/rshea/src/watchman'
make: *** [Makefile:1264: all] Error 2
只需使用以下命令从官方存储库安装相同的 watchman 4.9.0软件包(并可能咨询官方指南):
如果您仍然确定编译 - 安装依赖项,然后使用以下命令编译应用程序: