9/18/2023 0 Comments Postgresqlmac m1Gem install pg -v 1.2.3 -with-pg_config=/usr/local/Cellar/postgresql/13.3/bin/pg_config -with-pq-dir=/usr/local/Cellar/libpq/13. # brew install -build-from-source postgresqlīrow install -build-from-source postgresql # You can try to install from source with: # Error: postgresql: no bottle available! Installed pg successfully with Ruby 2.6 too. noĬhecking for PQconnectdb() in -lms/libpq. Using config values from /opt/homebrew/bin/pg_configĬhecking for PQconnectdb() in -llibpq. ❯ gem install pg -v 1.2.3 -with-pq-dir=/usr/local/Cellar/libpq/13.3īuilding native extensions with: '-with-pq-dir=/usr/local/Cellar/libpq/13.3'ĭone installing documentation for pg after 0 secondsīut failed with Ruby 2.6, I don't know why gem install pg -v 1.2.3 -with-pq-dir=/usr/local/Cellar/libpq/13.3Ĭurrent directory: /Users/felix/.rvm/gems/ruby-2.6.6/gems/pg-1.2.3/ext Homebrew/homebrew-cask (git revision 2ab51af9c3 last commit ) Homebrew/homebrew-core (git revision ec99d74792c last commit ) ❯ brew install PostgreSQL # Install arm64 PostgreSQLĥ01 23655 1 0 2:29PM ? 0:00.10 /opt/homebrew/opt/postgresql/bin/postgres -D /opt/homebrew/var/postgres Since pg must be compiled with x86 libpq, so I installed libpq with x86 brewīrow: aliased to arch -x86_64 /usr/local/Homebrew/bin/brew re-bundle your project and enjoy ruby on rosetta 2 (for now)Įncountered the same issue with brew PostgreSQL, but I installed pg gem successfully with Ruby 2.7 on macOS M1(12 Monterey), I have both x86 and arm64 brew installed.eg $ bundle config build.pg -with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_configģb) (optional) for brew, you can do the same: $ bundle config build.pg -with-pg-config=$(brew -prefix)/opt/libpq/bin/pg_config install rbenv as x86 (or whatever your preferred ruby version manager)ģa) (optional) for postgres.app, you can pre-configure where pg-config lives so you don't have to run the manual gem install when it chokes.rbenv directories from your home dir ( homebrew uninstall instructions) Uninstall ARM based homebrew + rbenv and remove your. As FYI, there are new issues reported in its github repo, so hopefully it'll be solved soon here The problem was that I had a mix of ARM + x86 binaries on my system, and pg apparently can only be compiled with x86 at present. ![]() I ran into the same problem with M1 + the ruby pg gem. Ld: symbol(s) not found for architecture arm64Ĭlang: error: linker command failed with exit code 1 (use -v to see invocation)ġ5: int t(void) Undefined symbols for architecture arm64: Ld: warning: ignoring file /Applications/Postgres.app/Contents/Versions/13/lib/libpq.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64 When checking the error logs I see: have_library: checking for PQconnectdb() in -lpq. I get an error saying: ERROR: Error installing pg:ĮRROR: Failed to build gem native extension.Ĭan't find the PostgreSQL client library (libpq) When running bundle install it fails to build the pg gem so I tried to install the gem manually (by doing gem install pg - tried also with gem install pg -with-pg-config=/Applications/Postgres.app/Contents/Versions/10/bin/pg_config). I am running all of this within a virtual environment with the following versions: python: 3.8.I've been trying to install a rails project on my computer (Macbook Pro 2020 with M1) running Big Sur. I've also tried to explicitly give the driver file path to pyodbc in the connection string but then nnect() just hangs instead of aborting right away. USER DATA SOURCES.: /Users/kdot/.odbc.iniĪnd the odbcinst.ini file contains: ĭescription=Microsoft ODBC Driver 17 for SQL Serverĭriver=/opt/homebrew/lib/libmsodbcsql.17.dylib SYSTEM DATA SOURCES: /opt/homebrew/etc/odbc.iniįILE DATA SOURCES.: /opt/homebrew/etc/ODBCDataSources Here is the output when I run odbcinst -j: unixODBC 2.3.9ĭRIVERS.: /opt/homebrew/etc/odbcinst.ini ![]() Postgresql Website - To Download the PostgreSQL. So it seems like pyodbc cannot find the drivers I installed earlier. In this Video, We're going to see How We Can Download & install PostgreSQL 15 on MAC OS M1/M2 Machines. When I run pyodbc.drivers() I get an empty list. I then pip installed pyodbc but when I try to run nnect() within a test script, python just aborts with the following message, regardless which connection string I use:Īfter investigating a bit more I find that pyodbc doesn't have any drivers. So far I have installed unixodbc via homebrew and ODBC drivers according to the instructions found here: I have a new M1 pro macbook and I'm trying to install pyodbc and relevant drivers on my machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |