Ubuntu 16.04下用Stack Builder安装psqlODBC时提示unixODBC未找到
Hey there, I’ve run into this exact hiccup before when setting up psqlODBC on Ubuntu 16.04—let’s get this fixed up quickly for you!
The error you’re seeing happens because Stack Builder relies on the unixODBC library and its development files, which aren’t installed by default on Ubuntu 16.04. Here’s how to resolve it:
Step 1: Install the required unixODBC packages
Open up your terminal and run these commands one by one:
- First, update your local package index to make sure you’re pulling the latest available versions:
sudo apt-get update - Then install both the core unixODBC library and its development files (these are needed for psqlODBC to properly integrate):
sudo apt-get install unixodbc unixodbc-dev
Step 2: Re-run Stack Builder to install psqlODBC
Once the installation finishes, go back to Stack Builder and try installing psqlODBC again. The missing dependency error should be gone now, and the installation should complete without issues.
Alternative: Install psqlODBC directly via apt (if Stack Builder still acts up)
If for some reason Stack Builder still gives you trouble, you can skip it entirely and install the official psqlODBC package straight from Ubuntu’s repositories:sudo apt-get install odbc-postgresql
This will set up psqlODBC on your system, and you can then configure your ODBC connections manually if needed.
Give that a try—this should get you past the unixODBC not found error and up and running with psqlODBC in no time!
内容的提问来源于stack exchange,提问作者CodeGator

