Dreamhost Ubuntu Errors installing Postgresql - postgresql

I have a dreamhost dedicated server and I'm getting a driver error when trying to use Postgresql. I followed the instructions here to update/install pgsql. I got the error in the screenshot below.
The text of the error is:
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies:
postgresql : Depends: postgresql-9.1 but it is not going to be installed
postgresql-contrib : Depends: postgresql-contrib-9.1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
If I run psql --version It says 9.1.23 is installed.
I'm not sure if everything is fine because of that or what. Also, the DB is on AWS and is version 10.5. Is that even going to be compatible?
The Ubuntu version on dreamhost is 12.04, which is no deprecated, so I doubt I'm going to be able to update the pgsql driver there. I don't have any experience with this stuff, and I've read some stuff, but don't want to just go running things as this is a production server that will be in use first thing Monday AM and I don't want to screw anything up.
Locally I'm using the pdo driver with pgsql.

Related

postgresql/postgis looking for wrong version folder when creating extension in Azure DevOps pipeline

I'm building a pipeline on Azure DevOps with a Linux image as a base (ubuntu-latest). Here I'm installing PostgreSQL version 12 with PostGIS.
Here's what I install:
sudo apt-get install -y postgresql-12 postgresql-client-12 postgresql-12-postgis-3 postgresql-12-postgis-3-scripts
First I tried to install it without mentioning any version numbers, but then I got the error mentioned below and I followed recommendations to specifically do it like this.
Hence the specifically mentioned version numbers
No special additions, just a plain installation of Postgres.
Installation is going fine without any errors.
Then when I create my database and connect to it, I do CREATE EXTENSION POSTGIS; and I get this error:
psql:./create_tables.sql:3: ERROR: could not open extension control file "/usr/share/postgresql/14/extension/postgis.control": No such file or directory
I'm pulling my hair for some time now about this and I totally don't get where it gets that reference to a version 14 folder from. There is absolutely no version 14 installed.
I also tried to pull the Debian packages from the Postgres.org instead of the Ubuntu libraries, I tried to install PostGIS 2.5 and PostGIS 2.5 scripts packages. But whatever I do, I get the same result. Once I start the pipeline, the image gets built and Postgresql and PostGIS installed and then I get the same error as a result.
Did anyone have this same experience? Where could this library folder reference for version 14 come from?
EDIT 2022/05/21: I've added some checks to the scripts and when checking the version of PostgreSQL(via SELECT version(); ) it gives version 14 (!), which at least explains the error. Apparently version 14 indeed IS installed and runs on the default port 5432. Version 12 that is explicitly installed also runs, it runs on port 5433 (checked via cat /etc/postgresql/12/main/postgresql.conf ). I now explicitly start version 12 and connect in my scripts to port 5433, so I can continue, but I still wonder where that version 14 installation comes from.
Postgres 14 is pre-installed on the Microsoft Hosted agent for ubuntu-20
Reference:
https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#postgresql

How to fix "Nothing to do" error on openproject configure?

I am installing OpenProject 8.3.1 on my apache 2.4 CentOS7 WHM/CPanel VPS using packaged installation and I've run into the following problem:
When I run openproject configure right after installation process it goes well up until the line "No package mod_ssl available". Followed by "Error: Nothing to do". Openproject can't be accessed.
I'm using PostgreSQL and auto installation/configuration option. I've tried skipping all but the most essential options in configuration, to no help.
The mod_ssl unavailable bit is the most surprising, since after I run rpm -qa|grep mod_ssl I get "ea-apache24-mod_ssl-2.4.38-3.3.1.cpanel.x86_64" - meaning I in fact do have mod_ssl available.
It looks like you are using a non-standard CentOS edition with CPanel. I don't think OpenProject can be installed on such a distribution, because it seems to come with limitations as to what packages are available. The mod_ssl package you mention is the one originally distributed by the CentOS distribution.

postgresql-9.3-pljava-gcj for 64 bit architecture

I need to install pljava for postgresql 9.3 on Ubuntu 14.04. I installed the 64bit version of postgre using the apt-get packet manager of Ubuntu, and I tried installing pljava in the same way
sudo apt-get install postgresql-9.3-pljava-gcj
but it gives me the "unmet dependencies error"
The following packages have unmet dependencies:
postgresql-9.3-pljava-gcj:i386 : Depends: postgresql-9.3:i386 but it is not going to be installed
Apparently, there's no version of pljava for 64bit architectures of pljava for postgresql 9.3. Also searching the Web led me to this conclusion (https://launchpad.net/ubuntu/+source/postgresql-pljava/1.4.3-3 - see the "not build" versions of the packet).
Now, my problem is that I have to use a 64bit version of postgresql-9.3, and I definitely need pljava to embed some "java triggering" inside the db. Does anyone know any solution to this issue? Can I use pljava-9.1 with postgresql-9.3? Anything else?
Thanks a lot
There is no maintained PL/JAVA package for Ubuntu anymore. The package you mentioned is using a too old version of PL/JAVA, depending on gcj. It is highly recommended to use PL/JAVA version 1.5.0, using a recent Oracle or OpenJDK java version.
The sad news is you have to build it yourself. For instructions, see
https://tada.github.io/pljava/build/build.html (building)
https://tada.github.io/pljava/install/install.html (installing)
At the time this question was asked, it was true that there were not maintained PL/Java packages for Ubuntu.
Just to update the story, more recently there are. They can be found in the PGDG apt repository.

Installing postgis in mac

I am trying to install postgis in mac. But I am not sure if I should compile it from the source code or install the binary. When I tried to install the binary it says that I need to install postgresql 9.1 which I already have. What should I do? Are there any clear instructions for installing in mac
When I run into trouble I usually install from source. This gives the configuration and compilers a better chance to tailor everything to your computer. You must have the development libraries for postgresql installed however to make this work with postgis.

postgis environments changed with macport selfupdate

Last month I've installed PostgresSql 8.4.1 and Postgis 1.4 via macports on my Mac with Leopard(10.5), and everything just worked fine. I then updated to Snow Leopard(10.6) and still everything was working fine. Yesterday I've tried to install Gimp with macports, the installation failed. So I did a "port selfupdate" which seemed to destroyed parts of my Postgis installation.
When a try to access a table with geometry columns within my database I receive the following error:
ERROR: could not load library "/opt/local/lib/postgresql84/postgis-1.4.so": dlopen(/opt/local/lib/postgresql84/postgis-1.4.so, 10): Library not loaded: /opt/local/lib/libgeos_c.1.dylib
Referenced from: /opt/local/lib/postgresql84/postgis-1.4.so
Reason: no suitable image found. Did find:
/opt/local/lib/libgeos_c.1.dylib: mach-o, but wrong architecture
SQL Status:58P01
The other non-postgis tables are still accessible!
I've checked with "port installed" if postgis was maybe uninstalled, and received the following list:
...
postgis #1.4.0_1+postgresql84 (active)
postgresql84 #8.4.0_0
postgresql84 #8.4.1_0 (active)
postgresql84-server #8.4.0_0 (active)
...
I assume that the missing tables are still on the disk, but are not referenced correctly. Is there a way to search on the hard-disk for the database, and maybe change the reference?
When you upgraded from 10.5 to 10.6, did you reinstall MacPorts and reinstall your ports? MacPorts (and the ports it manages) are heavily tied to the version of the OS under which it is installed. If you upgrade the OS, you should reinstall MacPorts (and your ports). More information is available in the MacPorts migration FAQ.