How to build and install wal2json without also installing the package postgresql-server-dev on Debian 9? - postgresql

I'm trying to stream data automatically from PostgreSQL 10 to Kafka using debezium together with the logical decoding plugin, wal2json.
I followed all the instructions on how to build and install the plugin from this link by running these command lines:
$ git clone https://github.com/eulerto/wal2json.git
$ cd wal2json
$ PATH=/usr/lib/postgresql/10/bin:$PATH
$ USE_PGXS=1 make
$ USE_PGXS=1 sudo make install
Yet, the steps for installation include this command line: USE_PGXS=1 make and it requires the installation of this package
sudo apt-get install postgresql-server-dev-10
else, I get the following error
Makefile:10: /usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target '/usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk'. Stop.
In fact, I am not allowed to install the package postgresql-server-dev-10 for personal reasons.
Thus, is there any way to install wal2json without installing that package or without using the command make?
Thank you.

Related

Error while running 'make install' command to install Apache AGE

After successfully installing postgresql from source code, I got an error while installing Apache AGE. I have attached a screenshot of the error below. It would be great if someone can help out.Terminal view of command and error
I am searching online to find a solution but haven't been able to found yet.
From the image, it looks like you are using postgres 12.13.
For postgres 12, you should checkout to age for pg12 branch by doing git checkout release/PG12/1.1.1 and then make install.
I was also getting errors in a configuration which were resolved by using this command first.
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Try this and this will solve your problem too
In addition to installing the essential libraries before the actual installation using:
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison (Note: The above command is for Ubuntu only. If you are not on Ubuntu, See here)
It is also recommended to install the postgreSQL development files using:
sudo apt install postgresql-server-dev-xx
This is not the exact command to be typed in the terminal. Check out the link
here to see the exact compatible command to execute according to the version of Linux you are currently using.

Installing Vivado ML 2021.2 in CentOs but process is hang in 'Generating installed device list'

anybody can help me figure out why the installation is hanging on 'Generating installed device list' and how to solve it without starting the process all over. I am working on CentOs.
Thanks in advance
I think this happens due to following missing packages:
libstdc++6:i386
libgtk2.0-0:i386
dpkg-dev:i386
ncurses5-compat-libs
python3-pip
libtinfo5
libncurses5
As BKN mentioned, you need to install the missing packages.
To avoid starting all over again, you can do the following:
Check the log: cat ~/.Xilinx/xinstall/*.log
Locate the error message. It should look something like:
2022-01-09 10:53:11,458 DEBUG: n.t:? - Executing script Generating installed device list: /tools/Xilinx/Vivado/2021.2/bin/vivado [-nolog, -nojournal, -mode, batch, -source, /tools/Xilinx/Vivado/2021.2/scripts/sysgen/tcl/xlpartinfo.tcl, -tclargs, /tools/Xilinx/Vivado/2021.2/data/parts/installed_devices.txt]
2022-01-09 12:05:35,319 DEBUG: n.t:? - Unable to run GenerateDevListFileLin, exit code: 130, stdout: , stderr: application-specific initialization failed: couldn't load file "librdi_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory failure msg:
application-specific initialization failed: couldn't load file "librdi_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory
2022-01-09 12:05:35,319 DEBUG: n.t:? - Executing script Generating installed device list for Model Composer: /tools/Xilinx/Vivado/2021.2/bin/vivado [-nolog, -nojournal, -mode, batch, -source, /tools/Xilinx/Model_Composer/2021.2/data/xmcGenBoardParts.tcl, -tclargs, /tools/Xilinx/Model_Composer/2021.2/../../Vivado/2021.2, librdi_dsp_tcltasks.so, /tools/Xilinx/Model_Composer/2021.2/data]
The log informs you exactly what the missing package is (in this case it was libtinfo), and also provides you with the script to run after you install the package:
/tools/Xilinx/Vivado/2021.2/bin/vivado -nolog -nojournal -mode batch -source /tools/Xilinx/Vivado/2021.2/scripts/sysgen/tcl/xlpartinfo.tcl -tclargs /tools/Xilinx/Vivado/2021.2/data/parts/installed_devices.txt
Notes:
Make sure to use the Vivado version (here it was 2021.2) and location (here it was /tools/Xilinx) according to your system.
You may need to run the script in sudo if the the permissions for writing are not available in user mode.
I also encounterd this problem on Archlinux with Vivado 2018.3.
But I just installed the library ncurses5-compat-libs, then the problem is solved.
Perhaps you can solve this by checking the library ncurses5-compat-libs.
Download the tar package instead of the self-extracting bin package
Update the java and python version
sudo apt-get install -y python3-pip
Install Dependencies
sudo apt-get install -y libstdc++6
sudo apt-get install -y libgtk2.0-0
sudo apt-get install -y dpkg-dev
NOTE: Without ibtinfo5 the application will not start and without libncurses5 the simulation will fail
`sudo apt-get install -y libtinfo5 libncurses5`
Restart the system
Untar that Vivado package
tar -xzvf Xilinx_Unified_2021.2_1021_0703.tar.gz
Locate the xsetup file in the package
Install the package in batch mode
./xsetup --agree 3rdPartyEULA,XilinxEULA --batch Install --product "Vivado" --edition "Vivado ML Enterprise" --location "/home/USER"
Once the installation has been successfully completed
Locate the settings64.sh file
./settings64.sh
Locate the cable drivers
cd Vivado/2021.2/data/xicom/cable_drivers/lin64/install_scripts/install_drivers
./install_drivers
Installing Vivado Board Files
Get the board package from the git https://github.com/Digilent/vivado-boards.git
From the vivado-board-master package copy the folder board_files undert /vivado-board-master/new/board_files
Paste the board files to Vivado/2021.2/data/boards
From the vivado-board-master package copy the file Vivado_init.tcl under /vivado-board-master/utility
Paste the file Vivado_init.tcl to the Vivado installation
That's it!! You might not need to do all these steps but that is what I ended up doing and it worked for the two machines where I installed Vivado. The installation took less than one hour.
This was originally edited into the question itself by the OP.

Where is libpq-fe.h on a Travis-CI instance?

I'm trying to build a postgres database adapter (luapgsql) as part of my setup:
install:
- sudo luarocks install --server=http://rocks.moonscript.org/dev luapgsql
But the build can't find libpq-fe.h:
Error: Could not find expected file libpq-fe.h, or libpq-fe.h for PQ --
you may have to install PQ in your system and/or pass PQ_DIR or
PQ_INCDIR to the luarocks command. Example: luarocks install luapgsql
PQ_DIR=/usr/local
I've tried what's suggested above, apt-get install libpq-dev and just find \ -name libpq-fe.h. No luck so far. Any ideas where it might be?
So it turns out that running pg_config as part of the install: was the answer. I could read the output in the log.
In the end, the line that worked for me for installing luapgsql on travis is:
sudo luarocks install --server=http://rocks.moonscript.org/dev luapgsql PQ_INCDIR=/usr/include/postgresql PQ_LIBDIR=/usr/lib/x86_64-linux-gnu

Error "the PGXS Makefile cannot be found" when installing PostGis on Debian

I am in the process of installing PostGis over psql on a Debian machine (actually crunchbang).
I have completed the following steps:
$ wget http://download.osgeo.org/postgis/source/postgis-2.0.3.tar.gz
$ tar xzf postgis-2.0.3.tar.gz
$ cd postgis-2.0.3
$ ./configure
On the final step I get the following error:
configure: error: the PGXS Makefile /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk cannot be found. Please install the PostgreSQL server development packages and re-run configure.
The issue is that I do already have Postgres installed:
$ psql --version
psql (9.1.9)
I have checked this on two machines with the same configuration and get the same error. What am I missing here?
PostgreSQL is broken down into several packages, and having psql installed doesn't imply that the development packages are also installed.
According to the error message:
Please install the PostgreSQL server development packages and re-run
configure
you need:
# apt-get install postgresql-server-dev-9.1
Also note there's a APT pgdg repository providing recent pre-compiled versions of postgres-related packages (including postgis) that you may use instead of self-compiling.
If your system is set up to use this repository, just do:
# apt-get install postgresql-9.1-postgis-2.0
Daniel's answer works great except that it needs the following update:
$ sudo apt-get install postgresql-9.1-postgis-2.1
These packages can be updated some time in future again. So, it is recommended to search for new packages using aptitude and install the appropriate one:
$ aptitude search postgis

Setting up Mesos on CentOS

I tried to install the latest release tarball of Mesos on CentOS 6.4 with no luck. It ended up in all sorts of failures in trying to find jvm & jni bindings. Is there any instructions on how to install Mesos on RHEL or CentOS ?
I couldn't find any instructions around so I thought I would troubleshoot all through my way and thought of documenting it here so it can save your time.
First things first, load your CentOS box with essential build tools to get started
$ sudo yum groupinstall "Development tools"
Get Java and python dependencies installed
$ sudo yum install java-1.6.0-openjdk.x86_64 java-1.6.0-openjdk-devel.x86_64 python python-devel libcurl libcurl-devel
Get the latest Mesos tarball
$ wget http://mirror.nus.edu.sg/apache/mesos/0.13.0/mesos-0.13.0.tar.gz
$ tar -xzvf mesos-0.13.0.tar.gz
$ cd mesos-0.13.0
Before you can build Mesos, you need to set correct JAVA binding paths
$ export JAVA_HOME=/usr
$ export JAVA_LDFLAGS="-L/usr/lib/jvm/java-1.6.0/jre/lib/amd64/server -R/usr/lib/jvm/java-1.6.0/jre/lib/amd64/server -ljvm"
$ export JAVA_CPPFLAGS="-I/usr/lib/jvm/java-1.6.0/include -I/usr/lib/jvm/java-1.6.0/include/linux"
$ export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0/jre/lib/amd64/server:$LD_LIBRARY_PATH
Configure and build it
$ ./configure
$ make
After you have built Mesos, it is advisable that you build and run the tests, this will make sure that what you have installed meets all the requirements
$ make check
If the checks are successful, You are just one step away from installing it in your system installation paths
$ make install
To learn how to use Mesos , go here http://mesos.apache.org/gettingstarted/
For those who prefer installing from RPM's, here is a link to a number of different releases for different Linux flavors: http://mesosphere.io/downloads/ For example, for Centos64:
wget http://downloads.mesosphere.io/master/centos/6/mesos_0.14.2_x86_64.rpm
sudo rpm -Uvh mesos_0.14.2_x86_64.rpm
I also had to set my LD_LIBRARY_PATH, though to a slightly different value. Check yours.
Python bindings can also be downloaded from the first link above:
wget http://downloads.mesosphere.io/master/centos/6/mesos_0.14.2_x86_64.egg
sudo easy_install mesos_0.14.2_x86_64.egg