Swift Vapor Postgres Xcode Build Error: Could not build Objective-C module 'CPostgreSQLMac'
Swift Vapor Postgres Xcode Build Error: Could not build Objective-C module 'CPostgreSQLMac'
将 vapor 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 或其他方式安装 postgres。您需要使用 brew 安装来解决此错误。
运行 以下:brew install postgres
将 vapor 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 或其他方式安装 postgres。您需要使用 brew 安装来解决此错误。
运行 以下:brew install postgres