【问题标题】:Vapor 4 - Unable to build hello world on fresh installVapor 4 - 无法在全新安装时构建 hello world
【发布时间】:2022-06-10 18:27:26
【问题描述】:

我使用过 Vapor 3,但这是我第一次使用版本 4。我正在使用 Ubuntu 20.04 和 Swift 5.6.1 设置一个全新的服务器环境。我可以毫无问题地创建一个新的 Swift 项目,构建和运行它。

接下来我会关注 Vapor 的 InstallGetting Started 文档。我能够很好地安装 Vapor Toolbox。然后为了测试我与文档一起工作并运行:

vapor new hello -n
cd hello
swift run

起初它似乎工作正常,获取依赖项:

....
Creating working copy for https://github.com/vapor/async-kit.git
Working copy of https://github.com/vapor/async-kit.git resolved at 1.12.0
Creating working copy for https://github.com/apple/swift-nio-extras.git
Working copy of https://github.com/apple/swift-nio-extras.git resolved at 1.12.0
Building for debugging...
[1605/1613] Wrapping AST for Backtrace for debugging

此时它会退出而没有错误消息或任何内容。

如果我再次运行,情况类似。最终它吐出一个错误:

error: emit-module command failed due to signal 9 (use -v to see invocation)

运行 verbose 会吐出一大串不可读的路径和命令。

编辑:Here's a paste 的详细输出,因为它太长而无法包含

【问题讨论】:

  • 需要看日志。
  • @cora 编辑了详细输出的粘贴。
  • 运行“swift build -c release”,看看你是否有不同的行为。

标签: swift linux ubuntu-20.04 vapor


【解决方案1】:

听起来您的内存不足。尝试启用交换或给机器更多 RAM,然后重试

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-18
    • 2016-04-25
    相关资源
    最近更新 更多