我一直在尝试将fluent-mysql依赖项添加到我的蒸气项目中,以便从该项目中查询单独的mysql数据库。 但是我似乎总是会遇到某种错误,例如,当我尝试vapor update它永远不会完成。 (我已经将它放置了几个小时了),我也尝试了swift package update但是有同样的错误。 我现在处于vapor update可以正常工作的地步,但是我仍然遇到两个错误'mysql/udf_registration_types.h' file not found with include; use "quotes" instead 'mysql/udf_registration_types.h' file not found with include; use "quotes" instead
并且Could not build Objective-C module 'CMySQL'
我从蒸气Web模板更改的唯一东西是package.swift ,现在是这样的:
import PackageDescription
let package = Package(
name: "iPadLocator",
products: [
.library(name: "App", targets: ["App"]),
.executable(name: "Run", targets: ["Run"])
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", .upToNextMajor(from: "2.2.0")),
.package(url: "https://github.com/vapor/leaf-provider.git", .upToNextMajor(from: "1.1.0")),
.package(url: "https://github.com/vapor/fluent-mysql.git", .upToNextMajor(from: "2.0.0"))
],
targets: [
.target(
name: "App",
dependencies: ["Vapor", "LeafProvider", "MySQLDriver"],
exclude: ["Config", "Database", "Public", "Resources"]
),
.target(name: "Run", dependencies: ["App"]),
.testTarget(name: "AppTests", dependencies: ["App", "Testing"])
]
)
在此先感谢您的任何帮助。 这是我的第一个stackOverflow问题,非常抱歉。 我正在运行vapor Toolbox 3.1.7和Vapor framework 2.4.4 ,同时安装了mysql和cmysql并保持最新。