【发布时间】:2022-06-10 18:27:26
【问题描述】:
我使用过 Vapor 3,但这是我第一次使用版本 4。我正在使用 Ubuntu 20.04 和 Swift 5.6.1 设置一个全新的服务器环境。我可以毫无问题地创建一个新的 Swift 项目,构建和运行它。
接下来我会关注 Vapor 的 Install 和 Getting 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