So I have AWS Aurora database recognized as Postgres 14.8;
I also have AWS virtual linux machine where I run R server 4.02
This R server runs my Shiny-based application that connects to AWS Postgres and gives users GUI access to some tables.
I created a new role in Postgres and when trying to run my Shiny application under that role, I got that error message -"SCRAM authentication requires libpq version 10"
As I understand this is what happened:
For development I was using roles created long ago and their passwords were encrypted with md5; but when I created a new role, its password was encrypted under SCRAM. Which is not supported by current libpq library.
Please explain me in simple words: WHERE is this library?
Is it on AWS linux machine (image) where our Aurora Postgres runs,
or
is it on that AWS machine where I run R server?
I do have access to R server and I searched for libpq packages there, found nothing installed.
I ran sudo yum list installed | grep libpq, nothing returned.
So is that library installed on linux server where our Postgres lives?
I am suspecting that your R server runs under Amazon Linux 2 or a linux distribution compatble with RHEL 7/CentOS 7. Those distributions only ship with postgres clients (libpq) in version 9 - as the error message says you need at least libpq version 10. RHEL 7 only ships with version 9 so we need to use a third-party repository to install the updated libpq. Fortunately postgresql.org itself offers such a repository for all major linux distros.
You can install one of the repo files from Repo RPMs - PostgreSQL YUM Repository or run (all commands below for CentOS 7 - compatible with Amazon Linux 2)
Please make sure you understand what linux distribution are running before attempting to run the below commands !
Once you followed those steps, you should be able to contact your Aurora DB with ease. Let me know if you're still stuck.
PS: The reason why yum list installed | grep libpq did not return anything is because the package that provides libpq is named postgresql-libs - you can find out package named by running yum whatprovides libpq.so.* which will return you all RPMs that contain the shard librarylibpq.so.*.
Thank you for response, it totally makes sense!
When I tried to run sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
I got this:
--> Processing Dependency: /etc/redhat-release for package: pgdg-redhat-repo-42.0-38PGDG.noarch
--> Finished Dependency Resolution
Error: Package: pgdg-redhat-repo-42.0-38PGDG.noarch (/pgdg-redhat-repo-latest.noarch)
Requires: /etc/redhat-release
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
So installation failed.
I tried to run it with --skip-broken and also ran rpm -Va --nofiles --nodigest, but with no success.
Can you please give an advice what should I do to get it installed?
wow - that is even more elegant than my next solution with messing around with yum repositories - the postgresql.org repos are not compatible with Amazon linux at all !
Thanks for sharing - this will be valuable for quite a few more users I hope.