Login  Register

configuring psqlodbc-13.00.0000 in RHEL7 64bit

classic Classic list List threaded Threaded
15 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
Dear Erman,

Our db version 12.1.0.2

OS version RHEL 7

we are trying to create dblink from oracle to postgresql database.As part of requirement,we are configuring psqlodbc driver.

I downloaded psqlodbc-13.00.0000.tar.gz and did following

% tar -zxvf psqlodbc-13.00.0000.tar.gz
% cd psqlodbc-13.00.0000
% ./configure
I am getting
"configure: error: libpq library version >= 9.2 is required
"
How can I resolve it?

But looks like it is existing:

[root@erpsupportdb psqlodbc-09.06.0500]# cd /usr
[root@erpsupportdb usr]# ls -lrt
total 328
drwxr-xr-x.   2 root root     6 Mar 10  2016 games
drwxr-xr-x.   2 root root     6 Mar 10  2016 etc
drwxr-xr-x.  12 root root   131 Mar 10  2017 local
lrwxrwxrwx.   1 root root    10 Mar 10  2017 tmp -> ../var/tmp
drwxr-xr-x.   4 root root    34 Mar 10  2017 src
drwxr-xr-x.  41 root root  8192 Mar 10  2017 libexec
drwxr-xr-x. 272 root root  8192 Apr  5  2017 share
drwxr-xr-x.   3 root root    17 Apr  5  2017 X11R6
dr-xr-xr-x.  54 root root 12288 Apr  5  2017 lib
dr-xr-xr-x.   2 root root 20480 Jan  7  2020 sbin
dr-xr-xr-x.   2 root root 61440 May  1 17:50 bin
drwxr-xr-x.  42 root root  8192 May  1 17:50 include
drwxr-xr-x    4 root root    30 May  3 14:09 pgsql-13
dr-xr-xr-x. 154 root root 98304 May  3 14:14 lib64

[root@erpsupportdb usr]# cd pgsql-13
[root@erpsupportdb pgsql-13]# pwd
/usr/pgsql-13
[root@erpsupportdb pgsql-13]# ls
lib  share

[root@erpsupportdb pgsql-13]# cd lib
[root@erpsupportdb lib]# ls -lrt
total 1120
-rw-r--r-- 1 root root 562754 Sep 23  2020 libpgfeutils.a
-rwxr-xr-x 1 root root  24416 Sep 23  2020 libpqwalreceiver.so
-rwxr-xr-x 1 root root 329632 Sep 23  2020 libpq.so.5.13
-rwxr-xr-x 1 root root  82608 Sep 23  2020 libpgtypes.so.3.13
-rwxr-xr-x 1 root root  96016 Sep 23  2020 libecpg.so.6.13
-rwxr-xr-x 1 root root  37176 Sep 23  2020 libecpg_compat.so.3.13
lrwxrwxrwx 1 root root     15 May  3 14:09 libecpg.so -> libecpg.so.6.13
lrwxrwxrwx 1 root root     15 May  3 14:09 libecpg.so.6 -> libecpg.so.6.13
lrwxrwxrwx 1 root root     22 May  3 14:09 libecpg_compat.so.3 -> libecpg_compat.so.3.13
lrwxrwxrwx 1 root root     18 May  3 14:09 libpgtypes.so.3 -> libpgtypes.so.3.13
lrwxrwxrwx 1 root root     13 May  3 14:09 libpq.so.5 -> libpq.so.5.13
[root@erpsupportdb lib]#

Any help?

Thank You
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

ErmanArslansOracleBlog
Administrator
5727 posts
I tested it in my lab (Oracle Linux 7) and I will be able to successfully configure psqlodbc-13.00.0000 using the following libpq5 packages :

[root@ebsclone psqlodbc-13.00.0000]# rpm -qa|grep libpq

libpq5-13.2-10PGDG.rhel7.x86_64
libpq5-devel-13.2-10PGDG.rhel7.x86_64

[root@ebsclone ~]# locate libpq
/usr/include/libpq
/usr/include/libpq-events.h
/usr/include/libpq-fe.h
/usr/include/libpq/libpq-fs.h
/usr/include/pgsql/internal/libpq
/usr/include/pgsql/internal/libpq-int.h
/usr/include/pgsql/internal/libpq/pqcomm.h
/usr/lib64/libpq.so
/usr/lib64/libpq.so.5
/usr/lib64/libpq.so.5.13
/usr/lib64/pkgconfig/libpq.pc
/usr/share/locale/cs/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/de/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/es/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/fr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/it/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ja/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ko/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ru/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/sv/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/tr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/uk/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/zh_CN/LC_MESSAGES/libpq5-13.mo

OPERATION:

[root@ebsclone /]# yum install libpq5
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package libpq5.x86_64 0:13.2-10PGDG.rhel7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================================================================
 Package                                         Arch                                            Version                                                    Repository                                            Size
=======================================================================================================================================================================================================================
Installing:
 libpq5                                          x86_64                                          13.2-10PGDG.rhel7                                          pgdg-common                                          441 k

Transaction Summary
=======================================================================================================================================================================================================================
Install  1 Package




[root@ebsclone psqlodbc-13.00.0000]# yum install libpq5-devel
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package libpq5-devel.x86_64 0:13.2-10PGDG.rhel7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================================================================
 Package                                             Arch                                          Version                                                    Repository                                          Size
=======================================================================================================================================================================================================================
Installing:
 libpq5-devel                                        x86_64                                        13.2-10PGDG.rhel7                                          pgdg-common                                         88 k

Transaction Summary
=======================================================================================================================================================================================================================
Install  1 Package
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
Dear erman,

When I search for libpq,it’s not returning any data.Is ther any way to fix this.


[root@erpsupportdb ~]# rpm -qa | grep libpq
[root@erpsupportdb ~]#

root@erpsupportdb ~]# locate libpq
/usr/lib64/libpq.so.5
/usr/lib64/libpq.so.5.5
/usr/share/locale/cs/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/de/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/es/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/fr/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/it/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/ja/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/pl/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/pt_BR/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/ru/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/tr/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/zh_CN/LC_MESSAGES/libpq5-9.2.mo
/usr/share/locale/zh_TW/LC_MESSAGES/libpq5-9.2.mo

Do I need to install below packages what you showed in your output

libpq5-13.2-10PGDG.rhel7.x86_64
libpq5-devel-13.2-10PGDG.rhel7.x86_64

Thanks,
SG
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

ErmanArslansOracleBlog
Administrator
5727 posts
Yes,

Please install ->

libpq5-13.2-10PGDG.rhel7.x86_64
libpq5-devel-13.2-10PGDG.rhel7.x86_64
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
Dear erman,

Any link to download these or at least, can you pls let us know where can we download these packages.

Thanks,
SG
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
This post was updated on May 03, 2021; 1:54pm.
Dear erman,

Found some link to download but rpm naming is different.

https://yum.postgresql.org/13/redhat/rhel-7-x86_64/repoview/postgresql13-libs.html

Installed postgresql13-libs-13.2-1PGDG.rhel7.x86_64.rpm but same error repeats

[root@erpsupportdb satish]# yum install postgresql13-libs-13.0-1PGDG.rhel7.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Examining postgresql13-libs-13.0-1PGDG.rhel7.x86_64.rpm: postgresql13-libs-13.0-1PGDG.rhel7.x86_64
Marking postgresql13-libs-13.0-1PGDG.rhel7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package postgresql13-libs.x86_64 0:13.0-1PGDG.rhel7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                              Arch                      Version                             Repository                                                     Size
========================================================================================================================================================================
Installing:
 postgresql13-libs                    x86_64                    13.0-1PGDG.rhel7                    /postgresql13-libs-13.0-1PGDG.rhel7.x86_64                    1.5 M

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total size: 1.5 M
Installed size: 1.5 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : postgresql13-libs-13.0-1PGDG.rhel7.x86_64                                                                                                            1/1
  Verifying  : postgresql13-libs-13.0-1PGDG.rhel7.x86_64                                                                                                            1/1

Installed:
  postgresql13-libs.x86_64 0:13.0-1PGDG.rhel7

Complete!


Thanks,
SG
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

ErmanArslansOracleBlog
Administrator
5727 posts
You should configure your postgres-related yum repo first, and then directly install the rpm.. as I did..
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
Okay erman.

Downloading from https://yum.postgresql.org/repopackages/ for RedHat Linux X86 64

Thank you
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
This post was updated on May 04, 2021; 6:04am.
Dear Erman,

Running out of my thoughts.Please help

Downloaded pgdg-redhat-repo-latest.noarch.rpm from https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/

[root@erpsupportdb satish]# yum install -y pgdg-redhat-repo-latest.noarch.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Examining pgdg-redhat-repo-latest.noarch.rpm: pgdg-redhat-repo-42.0-14.noarch
pgdg-redhat-repo-latest.noarch.rpm: does not update installed package.
Error: Nothing to do
[root@erpsupportdb satish]#

Downloded suggested rpms

-rw-r--r-- 1 root    root   90268 May  4 10:44 libpq5-devel-13.2-10PGDG.rhel7.x86_64.rpm
-rw-r--r-- 1 root    root  451452 May  4 10:44 libpq5-13.2-10PGDG.rhel7.x86_64.rpm
-rw-r--r-- 1 root    root   90088 May  4 10:44 libpq5-devel-13.0-10PGDG.rhel7.x86_64.rpm
-rw-r--r-- 1 root    root  451852 May  4 10:44 libpq5-13.0-10PGDG.rhel7.x86_64.rpm

installed both highlighted once with yum and now have

[root@erpsupportdb satish]# rpm -qa|grep libpq5
libpq5-devel-13.2-10PGDG.rhel7.x86_64
libpq5-13.2-10PGDG.rhel7.x86_64
[root@erpsupportdb satish]#

Then tried again to configure,but same error returns

[root@erpsupportdb satish]# cd psqlodbc-13.00.0000
[root@erpsupportdb psqlodbc-13.00.0000]# pwd
/ERPShareddrive/ERP/opm/satish/psqlodbc-13.00.0000
[root@erpsupportdb psqlodbc-13.00.0000]# ./configure --prefix=/usr/psqlodbc --enable-pthreads
: : :
: : :
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for library containing SQLGetPrivateProfileString... -lodbcinst
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lpthread... yes
checking for PQsetSingleRowMode in -lpq... no
configure: error: libpq library version >= 9.2 is required
[root@erpsupportdb psqlodbc-13.00.0000]#

Am i missing any steps,not sure..This is the first step which i doing "./configure --prefix=/usr/psqlodbc --enable-pthred"..Do i need to install anything before this?

Thanks,
SG
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
Dear Erman,

I tried with different odbc version and in new test server.This time error is different.Can you guide us

I downloaded psqlodbc-09.03.0100.tar.gz and unzipped it and then ran the configure command

[root@erpdevelopmentdb psqlodbc-09.03.0100]# ./configure --prefix=/usr/psqlodbc --enable-pthreads
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: error: odbc_config not found (required for unixODBC build)----->error


So installed unixODBC as below

[root@erpdevelopmentdb psqlodbc-09.03.0100]# yum install unixODBC
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
base                                                                                                                                             | 2.9 kB  00:00:00
zabbix                                                                                                                                           | 2.9 kB  00:00:00
zabbix-non-supported                                                                                                                             |  951 B  00:00:00
zabbix/x86_64/primary_db                                                                                                                         | 209 kB  00:00:01
Resolving Dependencies
--> Running transaction check
---> Package unixODBC.x86_64 0:2.3.1-11.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                 Arch                                  Version                                        Repository                           Size
========================================================================================================================================================================
Installing:
 unixODBC                                x86_64                                2.3.1-11.el7                                   base                                413 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total download size: 413 k
Installed size: 1.2 M
Is this ok [y/d/N]: y
Downloading packages:
unixODBC-2.3.1-11.el7.x86_64.rpm                                                                                                                 | 413 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : unixODBC-2.3.1-11.el7.x86_64                                                                                                                         1/1
  Verifying  : unixODBC-2.3.1-11.el7.x86_64                                                                                                                         1/1

Installed:
  unixODBC.x86_64 0:2.3.1-11.el7

Complete!


Then ran configure command again,this time error is "configure: error: libpq library not found"


erpdevelopmentdb psqlodbc-09.03.0100]# pwd
/ERPShareddrive/ERP/opm/satish/psqlodbc-09.03.0100
[root@erpdevelopmentdb psqlodbc-09.03.0100]# ./configure --prefix=/usr/psqlodbc --enable-pthreads
checking for a BSD-compatible install... /usr/bin/install -
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPI
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lpthread... yes
checking for PQconnectdb in -lpq... no
configure: error: libpq library not found
[root@erpdevelopmentdb psqlodbc-09.03.0100]#


Do we need to install any postgresql odbc before running above configure command?

Thanks,
SG
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

ErmanArslansOracleBlog
Administrator
5727 posts
Did you install the libpq to this server?
Looks like there is lno ibpq installed in this server.
Install libpq5 as I did and retry the configuration operation..
At the end of the day, you need to have libpq5-13.2-10PGDG.rhel7.x86_64 and libpq5-devel-13.2-10PGDG.rhel7.x86_64 installed in your server to be able to that configure operation .. I tested it On Oracle Linux 7 / RHEL 7, so the solution is clear.. Please follow the action plan properly and fix the issue.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
Dear Erman,

These rpms are installed...

Logs for your reference

[root@erpdevelopmentdb satish]# yum install libpq5-13.2-10PGDG.rhel7.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Examining libpq5-13.2-10PGDG.rhel7.x86_64.rpm: libpq5-13.2-10PGDG.rhel7.x86_64
Marking libpq5-13.2-10PGDG.rhel7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package libpq5.x86_64 0:13.2-10PGDG.rhel7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                        Arch                           Version                                   Repository                                                Size
========================================================================================================================================================================
Installing:
 libpq5                         x86_64                         13.2-10PGDG.rhel7                         /libpq5-13.2-10PGDG.rhel7.x86_64                         1.6 M

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total size: 1.6 M
Installed size: 1.6 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libpq5-13.2-10PGDG.rhel7.x86_64                                                                                                                      1/1
  Verifying  : libpq5-13.2-10PGDG.rhel7.x86_64                                                                                                                      1/1

Installed:
  libpq5.x86_64 0:13.2-10PGDG.rhel7

Complete!
[root@erpdevelopmentdb satish]# yum install libpq5-devel-13.2-10PGDG.rhel7.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Examining libpq5-devel-13.2-10PGDG.rhel7.x86_64.rpm: libpq5-devel-13.2-10PGDG.rhel7.x86_64
Marking libpq5-devel-13.2-10PGDG.rhel7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package libpq5-devel.x86_64 0:13.2-10PGDG.rhel7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                           Arch                        Version                                Repository                                                   Size
========================================================================================================================================================================
Installing:
 libpq5-devel                      x86_64                      13.2-10PGDG.rhel7                      /libpq5-devel-13.2-10PGDG.rhel7.x86_64                      320 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total size: 320 k
Installed size: 320 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libpq5-devel-13.2-10PGDG.rhel7.x86_64                                                                                                                1/1
  Verifying  : libpq5-devel-13.2-10PGDG.rhel7.x86_64                                                                                                                1/1

Installed:
  libpq5-devel.x86_64 0:13.2-10PGDG.rhel7

Complete!

[root@erpdevelopmentdb satish]# rpm -qa|grep libpq
libpq5-13.2-10PGDG.rhel7.x86_64
libpq5-devel-13.2-10PGDG.rhel7.x86_64
[root@erpdevelopmentdb satish]#



Still the same error..

checking for pthread_create in -lpthreads... no
checking for pthread_create in -lpthread... yes
checking for PQconnectdb in -lpq... no
configure: error: libpq library not found
[root@erpdevelopmentdb psqlodbc-09.03.0100]#

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

ErmanArslansOracleBlog
Administrator
5727 posts
What does the command "locate libpq" return at the moment?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

satish
1160 posts
[root@erpdevelopmentdb lib64]# locate libpq
[root@erpdevelopmentdb lib64]#
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: configuring psqlodbc-13.00.0000 in RHEL7 64bit

ErmanArslansOracleBlog
Administrator
5727 posts
run updatedb command first, then run locate libpq.

updatedb
locate libpq