-2

I am trying to install apacheage with the help of documentation. But I was having the same problems as asked in the question. So, I followed this answer to the above question.

All the errors which I was getting was solved but I am now getting the this new error. I tried using sudo but this error remains same.

/usr/bin/install -c -m 755  age.so '/usr/lib/postgresql/12/lib/age.so'
/usr/bin/install: cannot create regular file '/usr/lib/postgresql/12/lib/age.so': Permission denied
make: *** [/usr/lib/postgresql/12/lib/pgxs/src/makefiles/../../src/Makefile.shlib:487: install-lib-shared] Error 1

I am using Ubuntu 22.04 and installed postgresql using sudo apt install postgresql-server-dev-12.

I tried installing using master branch branch but I am getting the following error with that.

src/backend/catalog/ag_graph.c:67:15: error: void value not ignored as it ought to be
   67 |     graph_oid = CatalogTupleInsert(ag_graph, tuple);
      |               ^
make: *** [<builtin>: src/backend/catalog/ag_graph.o] Error 1

abhishek2046
  • 312
  • 1
  • 11

8 Answers8

1

To fix the "Permission denied" error, you need to grant write permission to the directory where you're trying to install the extension. You can do this by running the command:

sudo chmod -R u+w /usr/lib/postgresql/12

Note that postgresql-server-dev-12 only install header files, not postgreSQL itself. And you don't need these header files anymore because latest versions of postgreSQL include these in their standard installation.

Follow this guide instead to install PostgreSQL and Apache AGE:

Apache Age Installation

Mohayu Din
  • 433
  • 9
  • I followed the instruction and it installed but when I used make PG_CONFIG=/usr/bin/pg_config installcheck, it said that 1 test case (catalog) failed out of 19. Is that a issue and do I need to do anything about it? – abhishek2046 Mar 22 '23 at 14:54
1

If you are installing Apache AGE for PostgreSQL 12, make sure to install from the latest stable release and avoid using the master branch. To do this, just use the following command: git checkout release/PG12/1.1.0. Then, you can install Apache AGE from this branch.

Carla
  • 326
  • 1
  • 7
0

You need to provide write/update permissions to the directory. For this execute the following command with path to the directory:

sudo chmod +w /path/to/your/directory

This command gives write permission. Also substitute path to your directory accordingly.

Huzaifa
  • 484
  • 4
  • 8
0

The second error that you got is because of version incompatibility between AGE and PostgreSQL. Try installing again with the compatible versions of both.

For PostgreSQL 12, AGE Alpha branch should be used while others are compatible with PostgreSQL 11.

Link for postgres 12 compatible AGE branch: https://github.com/apache/age/tree/AGE_PG12.1.0_ALPHA

0

I was facing the same issue, but I was able to resolve it using:

sudo apt-get -y install postgresql-server-dev-11
0

I also had problems like these when I was installing Apache AGE. Mine got resolved when I installed required dependencies. incase you have Postgres 11 installed then run

sudo apt install postgresql-server-dev-11

and incase of Postgres 12, run the following command,

sudo apt install postgresql-server-dev-12

it will most likely resolve the errors.

Incase you still get those error, go through following installation guides one by one and you will have successful Apache AGE installation.

Getting Started with APACHE AGE (Part 01): PostgreSQL installation On UBUNTU

APACHE AGE: Getting Started Part 2(AGE Installation)

0

I also had problems like these when installing the Apache Age. Use the command below:

sudo apt-get -y install postgresql-server-dev-11

Hopefully this will resolve your issue.

0

Before installation of PostgreSQL in your ubuntu try to run this command:

sudo apt-get install build-essential libreadline-dev zlib1g flex bison

It will install all the packages and essentials require for installation in your ubuntu.

For reference you can follow this blog for installation.

https://dev.to/hamza_ghouri/getting-started-with-apache-age-part-01-postgresql-installation-on-ubuntu-3cg6