当前位置 : 主页 > 手机开发 > 其它 >

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

来源:互联网 收集:自由互联 发布时间:2021-06-11
将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:
将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",
]

)

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

运行以下命令:brew install postgres

网友评论