0

我正在尝试将 SQLite 添加到 Vapor 应用程序,但运气不佳。这是我为将它添加到项目中所做的工作,以及我在尝试构建它时在 Xcode 中遇到的错误。导入语句中的 Sqlite.swift 中出现错误:“没有这样的模块 'CSQLiteMac'”我知道某处缺少框架,但我似乎无法追踪我缺少的内容,而且我的 google fu 让我失望了.

myke$ brew update
Already up-to-date.

myke$ brew install sqlite3 libsqlite3-dev
Error: No available formula with the name "libsqlite3-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
==> You haven't updated Homebrew in a while.
A formula for libsqlite3-dev might have been added recently.
Run `brew update` to get the latest Homebrew updates!

myke$ vapor build --clean
Cleaning [Done]
No Packages folder, fetch may take a while...
Fetching Dependencies [Done]
Building Project [Done]

myke$ vapor xcode
Fetching Dependencies [Done]
Generating Xcode Project [Done]
Select the `App` scheme to run.
Open Xcode project?
y/n>n

我的包文件:

import PackageDescription

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

1 回答 1

0

只需使用

brew install sqlite3

sqlite3软件包永远不会安装,因为它失败了

Error: No available formula with the name "libsqlite3-dev"
于 2016-09-29T20:04:52.627 回答