Installing postgresql12-devel after postgres12 DB has already been created - postgresql

I have already installed and loaded a postgres12 instance on Redhat7. Now we need the devel libs to compile additional packages like pg-hash64.
Has anyone installed other packages after postgres instance was already created? Is there any impact to the binaries already installed?
Thanks for any info.

As long as you are using the same source repository there should be no issue.
I have installed several PostgreSQL package on Centos 7 without any issue from :
repo id repo name status
!pgdg12/7/x86_64 PostgreSQL 12 for RHEL/CentOS 7 - x86_64 294
repolist: 294

pifor was right, not an issue, Im a new user so its not letting me click the up arrow.
For postgres12.2 instance on Redhat7 to get pg-hash64 installed:
yum install postgresql12-devel-12.2-2PGDG.rhel7.x86_64 or version to match your postgres install
yum install llvm-toolset-7
in /usr/lib64:
mkdir llvm5.0
in /usr/lib64/llvm5.0
ln -s /opt/rh/llvm-toolset-7/root/usr/bin bin
back in dir with unzipped package
make
make install
in psql:
CREATE EXTENSION hash64;

Related

Postgres 14 manual install on RedHat 8

I am trying to install Postgres 14 on a computer with no internet access:
sudo dnf install postgresql14-14.2-1PGDG.rhel7.x86_64.rpm
Error:
Problem: conflicting requests
nothing provides libreadline.so.6()(64bit) needed by postgresql14-14.2-1PGDG.rhel7.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
RedHat 8 comes with libreadline.so.7 and does not let me install redline 6. I created a symlink with ln -s libreadline.so.7.0 libreadline.so.6, but still getting the same error.
Do you have any idea? Thanks!
Mat, you are right! I got postgresql14-14.2-1PGDG.rhel8.x86_64.rpm installed. Thanks a lot!

gtkplugin.h: no such file or directory [centos 8]?

Fatal error: gtkplugin.h: no such file or directory
I am trying to use make to install plugin for pidgin on centos 8 we have seen the above error.
Even after installing gtk,gtk2/3 devel packages we couldn't get the headfile.
The problem is with centos 8 distribution since there is no pidgin-devel package by default yum installation. So with the use of dnf command and enabling powertools we can install it by using the below command:
dnf --enablerepo=powertools install pidgin-devel
Please refer the link

Can't use uuid and create an extension to use it

I want to use uuid in Postgresql 9.2 on Ubuntu 13. So when I tried to check whether is available or not, I did:
select uuid_generate_v4() as one;
And it gave me ERROR: function uuid_generate_v4() does not exist
Then I did CREATE EXTENSION "uuid-ossp";
ERROR: could not open extension control file "/usr/share/postgresql/9.2/extension/uuid-ossp.control": No such file or directory
Well, what do I do next?
By the way, SELECT * FROM pg_available_extensions; returns plpsql (1.0) only.
The operating system package that contains the extension is not installed. To install it:
apt-get install postgresql-contrib-9.2
For anyone using the asdf version manager with the asdf-postgres plugin, installing postgres versions as follows fixes this issue:
POSTGRES_EXTRA_CONFIGURE_OPTIONS=--with-uuid=e2fs asdf install postgres <VERSION>
For you guys, who installed postgres using postgres rpm repo on Fedora or similar distro:
sudo dnf install postgresql-contrib
installs a package from default fedora repo, which conflicts with postgres, like:
/usr/pgsql-12/lib/libpq.so.5: no version information available (required by psql)
Right way is
sudo dnf install postgresql12-contrib
You can double check it during install, it has to be from pgdg12, same as postgresql-server
(you have insert your postgres version instead of '12')
If you still get the error, try to run manually the two SQL files inside /usr/share/postgresql/9.X/extension/uuid-ossp*.sql into your database

How to update GLIBC_2.17 in CentOS

After unpacking the kingsoft-office_9.1.0.4032~a10_x86.tar, I run the "et", but the terminal telled me that
/king/kingsoft-office_9.1.0.4032~a10_x86/office6/et: /lib/libc.so.6: version `GLIBC_2.17' not found (required by /king/kingsoft-office_9.1.0.4032~a10_x86/office6/libstdc++.so.6)
then follwing the tip, I download the deb from http://community.wps.cn/wiki/Libstdc%2B%2B_too_old, and operated as what the website says, anyway, the same question still occurs
I also had to install it on Centos 6.3 just now as it's a dependency of something I needed. I looked on google for glibc_2.17 and centos and found your question. Then I looked for glibc_2.17 and Fedora and found this link http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/libc.so.6%28GLIBC_2.17%29%2864bit%29the and RPM for Fedora labeled 'other' which was this glibc-2.17-4.fc19.src.rpm. My intent with the link was not any plug, just a reference for the one I downloaded. I clicked on the fedora glibc link and after a few clicks had it in my Download folder.
I did the following and my depencency was resolved.
$ sudo user mockbuild
$ sudo groupadd mockbuild
groupadd: group 'mockbuild' already exists // I happened to already have it
$ sudo rpm -ivh glibc-2.17-4.fc19.src.rpm
warning: glibc-2.17-4.fc19.src.rpm: Header V3 RSA/SHA1 Signature, key ID ba094068: NOKEY
1:glibc ########################################### [100%]
Hope this helps, it's my first answer on stackoverflow.

Can't install jdk on Fedora with yum nor with rpm

Help! I can't figure out how to install a jdk!
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.6.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.6.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.6.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.6.0-openjdk available.
Error: Nothing to do
Here I've manually downloaded some rpm's, the last one from oracle's website:
[~]$ rpm -ivh java-1.7.0-openjdk-devel-1.7.0.19-2.3.9.3.fc20.x86_64.rpm
error: Failed dependencies:
java-1.7.0-openjdk = 1:1.7.0.19-2.3.9.3.fc20 is needed by java-1.7.0-openjdk-devel-1:1.7.0.19-2.3.9.3.fc20.x86_64
[~]$ sudo rpm -ivh java-1.7.0-openjdk-1.7.0.19-2.3.9.3.fc20.x86_64.rpm
Preparing... ################################# [100%]
file /usr/lib/jvm-exports/jre-1.7.0-openjdk.x86_64 from install of java-1.7.0-openjdk-1:1.7.0.19-2.3.9.3.fc20.x86_64 conflicts with file from package java-1.7.0-openjdk-1:1.7.0.9-2.3.7.0.fc18.x86_64
file /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 from install of java-1.7.0-openjdk-1:1.7.0.19-2.3.9.3.fc20.x86_64 conflicts with file from package java-1.7.0-openjdk-1:1.7.0.9-2.3.7.0.fc18.x86_64
[~]$ sudo rpm -ivh jdk-7u21-linux-x64.rpm
Preparing... ################################# [100%]
file /etc/init.d/jexec from install of jdk-2000:1.7.0_21-fcs.x86_64 conflicts with file from package jdk-2000:1.6.0_38-fcs.x86_64
Debug
Here's some debug information:
[/usr/lib/jvm]$ yum search jdk
Loaded plugins: langpacks, presto, refresh-packagekit
=========================================================== N/S Matched: jdk ============================================================
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
jdk.x86_64 : Java(TM) Platform Standard Edition Development Kit
ldapjdk.noarch : The Mozilla LDAP Java SDK
Name and summary matches only, use "search all" for everything.
.
[/usr/lib/jvm]$ yum list java*
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
java-1.5.0-gcj.x86_64
.
[/usr/lib/jvm]$ cat /etc/fedora-release
Fedora release 18 (Spherical Cow)
Requirements
I must have "jni.h", "libjava.so", "libhpi.so", "lipverify.so" and "libjvm.so" included.
So far I've found out that these DO NOT have what I need:
Undesired Versions (for sure):
jdk1.7.0_06 <-- I'm surprised about this one, but it doesn't have libjvm nor libhpi
java-1.7.0
java-openjdk
java-1.7.0-openjdk-1.7.0.9.x86_64
java-1.5.0-gcj-4.4
java-1.6.0-openjdk
java-1.7.0-openjdk.x86_64
jre-1.5.0-gcj
jre-1.7.0-openjdk.x86_64
jre-openjdk
jre-1.7.0
jre-7u11-linux-x64.rpm java-1.5.0-gcj-1.5.0.0
jre-1.5.0
jre1.7.0_11
jre-gcj
And these do:
Desired Versions (that I know of, there could be more):
jdk1.6.0_34-x86
jdk1.5.0_22-x86
java-6-openjdk
Can someone help me install jdk1.6 or java-6-openjdk please?
The problem here is that you cannot use the Oracle rpm to install JDK 7 when you already have the Oracle JDK 6 as it tries to install the /etc/init.d/jexec script which is already installed and required for JDK 6.
I would advise sticking to the tarball or self extracting *.bin and using JAVA_HOME if you are going to use the Oracle distribution as it does not have this problem and you will probably not need jexec anyway.
In general I would suggest that you install the Oracle JDK not the OpenJDK. Otherwise you might risk running into some issues. I always found problems of all sorts and sizes with OpenJDK that I don't even bother trying it any more.
Download the JDK RPM from here and follow the usual instructions. Its usually very straightforward and without problems.
Full detailed instructions including how to install it here.
Make sure you choose the right version you need (JDK 1.7 or JDK 1.6, dont mix) because from your question you seem to have a confusion of library versions from 1.5 to 1.7.
And another thing, uninstall whatever you have installed already before installing a fresh one to avoid conflicts.
Check my answer here Transaction check error when installing Sun JDK 7
Basically you may use rpm --force to install one JDK on top of the other. This scenario is completely valid specially when you have to develop for different JAVA versions.
Just faced the same issue. I was not comfortable using --force command; did not want to risk messing-up the existing Java that came installed at system setup.
I ended up doing the following and running the app server with a different version of Java under a different user ID.
downloaded the Java tar.gz version and uncompressed:
tar -zxvf jdk-7u45-linux-x64.gz
Created the directory:
mkdir /usr/java/jdk1.7.0_45
Copied the contents to the new directory manually:
cp -r /.../jdk1.7.0_45/* /usr/java/jdk1.7.0_45
Set the java_home under the user ID home directory in .bashrc and .bash_profile files:
export JAVA_HOME=/usr/java/jdk1.7.0_45
export PATH=$JAVA_HOME/bin:$PATH
export PATH=$PATH:/usr/sfw/lib/gcc:/usr/sfw/bin
sudo rpm -i jdk-11.0.9_linux-x64_bin.rpm
or whatever package you are trying to install