Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

PostgreSQL Vapor Packages won't compile after install #57

Closed
Red3nzo opened this issue Sep 14, 2017 · 3 comments
Closed

PostgreSQL Vapor Packages won't compile after install #57

Red3nzo opened this issue Sep 14, 2017 · 3 comments

Comments

@Red3nzo
Copy link

Red3nzo commented Sep 14, 2017

I installed PostgreSQL on my Mac and installed the PostgreSQL provider to my project but after I run my project it says how libpq-fe.h isn't found and also I've noticed the whole CPostgreSQL folder is empty under Dependencies. It also saysCould not build Objective-C module CPostgreSQL I'm guessing that's because the folder is empty. I have no clue how to fix this any any help would be greatly appreciated.

@vzsg
Copy link
Member

vzsg commented Sep 14, 2017

The fact that CPostgreSQL is empty is normal, it's a system module so it has no visible sources in Xcode.

But how did you install Postgres? If you install it with Homebrew, and Homebrew is installed in the default location, things should just work. But only then.

@Red3nzo
Copy link
Author

Red3nzo commented Sep 14, 2017

@vzsg I used the PostgreSQL app from their website for MacOS. I'm guessing this has to do with the problem

@Red3nzo
Copy link
Author

Red3nzo commented Sep 14, 2017

Alright after an hour of looking I figured out the solution. Under Dependencies I installed the line .Package(url: "https://github.com/vapor/postgresql.git", majorVersion: 2) .

Full Code

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/postgresql.git", majorVersion: 2),
.Package(url: "https://github.com/vapor-community/postgresql-provider.git", majorVersion: 2, minor: 0)
]

@vzsg vzsg closed this as completed Jan 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants