vapor-community / mysql-provider

MySQL provider for the Vapor web framework.
MIT License
30 stars 12 forks source link

Linux: you may be able to install cmysql using your system-packager #34

Closed TofPlay closed 7 years ago

TofPlay commented 7 years ago

Hi I install apt-get install libmysqlclient-dev but I still have the message:

note: you may be able to install cmysql using your system-packager:

    apt-get install libmysqlclient-dev 
/vapor/ItWorks-MySQL/.build/checkouts/cmysql.git-2031937687037823309/shim.h:4:10: error: 'mysql.h' file not found
#include <mysql.h>
         ^

If execute mysql_config --include I have:

$ mysql_config --include
-I/usr/include/mysql

And mysql.h is in the folder /usr/include/mysql

My Package.swift

import PackageDescription

let package = Package(
    name: "ItWorks-MySQL",
    targets: [
        Target(name: "App"),
        Target(name: "Run", dependencies: ["App"]),
    ],
    dependencies: [
        .Package(url: "https://github.com/vapor/vapor.git", majorVersion: 2),
        .Package(url: "https://github.com/vapor/fluent-provider.git", majorVersion: 1),
        .Package(url: "https://github.com/vapor/mysql-provider.git", majorVersion: 2)
    ],
    exclude: [
        "Config",
        "Database",
        "Localization",
        "Public",
        "Resources",
    ]
)
tanner0101 commented 7 years ago

Add Vapor's APT repo and do sudo apt-get install cmysql

Moving this issue here: https://github.com/vapor/cmysql/issues/11