How Do You Install pqxx on an AWS Instance of Ubuntu?

Problem scenario
You try to compile a C++ program (i.e., a .cpp file).  You get this message:  "fatal error:  pqxx/pqxx: No such file or directory."  You want to install pqxx on your Ubuntu server in AWS.  What do you do?

Solution
#1  Log into the server.  Run this command as root or with a sudo in front it:

add-apt-repository ppa:jtv/ppa 
#Press enter in response to the prompt from the command above.

#2  Run this command as root or with a sudo in front it:
apt-get update

#3  Update this file: /etc/apt/sources.list
Append these stanzas to the sources.list file:

deb http://ppa.launchpad.net/jtv/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/jtv/ppa/ubuntu xenial main

#4  Run this command as root or with a sudo in front it:
apt-get -y install libpqxx-dev

Leave a comment

Your email address will not be published. Required fields are marked *