Swift Vapor Postgres Xcode构建错误:无法构建Objective-C模块' CPostgreSQLMac'

时间:2017-02-11 03:38:02

标签: swift xcode postgresql vapor

将steam postgresql连接器添加到Package.swift

后出现构建错误
    import PackageDescription

        let package = Package(
        name: "todo_vapor_swift",
            dependencies: [
                .Package(url: "https://github.com/vapor/vapor.git", majorVersion: 1, minor: 5),
                .Package(url: "https://github.com/vapor/postgresql-provider", majorVersion: 1, minor: 0)
],
exclude: [
    "Config",
    "Database",
    "Localization",
    "Public",
    "Resources",
]

1 个答案:

答案 0 :(得分:11)

也许你用Postgress.app或其他方式安装了postgress。您需要使用brew安装来解决此错误。

运行以下内容:brew install postgres