openSUSE 15.4 zypper error installing postgreSQL - linux

I am new to Linux,
I installed openSUSE Leap 15.4, and made the root directory ext4, I then followed these steps to install postgreSQL 13 on my system
1.sudo zypper ref && sudo zypper update
sudo zypper addrepo https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo
But after this, I sudo zypper ref again and it shows an error saying:
Retrieving repository 'PostgreSQL 13 SLES 15.4 - x86_64' metadata .....................................[error]
Repository 'PostgreSQL 13 SLES 15.4 - x86_64' is invalid.
[pgdg-13|https://download.postgresql.org/pub/repos/zypp/13/suse/sles-15.4-x86_64] Valid metadata not found at specified URL
History:
- [pgdg-13|https://download.postgresql.org/pub/repos/zypp/13/suse/sles-15.4-x86_64] Repository type can't be determined.
what can I do to install postgreSQL

I can't say precisely why your zypper command failed, but it might have to do with the fact that the repositories from your link are intended for SUSE Linux Enterprise 15 SP4, not for openSUSE Leap 15.4, which is what you're using. So even if you did get these repositories to work, you might run into other compatibility problems later.
To install postgresql, there is always the option to search for your package on software.opensuse.org. (I strongly recommend you bookmark this page – it's the place to look for openSUSE packages.) For postgresql13, there is indeed an official experimental package available for openSUSE 15.4, namely here, which you can install via 1-Click-Install. However, the newer version postgresql14 is already out for quite a while, so I would only advise for using the older postgresql13 if you have a very strong reason to do so. The newer postgresql14 also has an official experimental package available for openSUSE 15.4, namely here; this is the one I would recommend currently.

first check if repo is enabled zypper repos -d
check /etc/zypp/repos.d/pgdg-13.repo file

If you open the added repo file all set sles. but i think the main problem is the type=rpm-md. In any case you dont need add third part repo to install postgress. the package is already in the main repos and is called postgresql-server.
So remove the https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo to prevent any other issues and package conflicts
zypper lr # to list the repos and find the number for the `https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo`
zypper rr <number>
Then just install postgresql-server
Btw when you refresh the packages you dont need to run update

Related

Linux Installation libX11-devel

I am trying to build QT4 (porting from Redhat 5 to 7 with an upgraded gcc compiler) in RedHat 7 and I was getting an error saying X11/Xlib.h can't be found. Anyways, after doing some research most people said to install libX11-devel to get those x11 libraries. Since I am using an offline machine I can't do "apt-get" type commands and have to manually install RPMs. So, I went to my RH-7 installation DVD and got "libX11-devel-1.6.3-3.el7.x86-64" (I have 64 bit OS) and tried to install using "yum install libX11-devel-1.6.3-3.el7.x86_64" and I am getting dependencies errors. It's saying
...Requires: pkgconfig(kbproto)
...Required: pkgconfig(xcb)
...Requires: pkgconfig(xproto)
...Requires: pkgconfig(xcb) >= 1.1.92
So, here are my questions.
1) when it says "pkgconfig(kbproto)", is it saying find the "kbproto....RPM" and do a "yum install". In my dvd I only have "xorg-x11-proto-devel-7.7.13.el7.noarch.rpm". Do I have to somehow find "xorg-x11-proto......x86_64.rpm" since it's a 64 bit machine?
2) Is there a difference between "yum install" and pkgconfig "install"? Are there any other installation variants in Linux?
3)For an offline machine, Is there anyway I can get all the dependencies and install everything at once ?
4) Why is it saying "xcb" requires twice. If I just get a xcb...rpm version above 1.1.92 can I just install it once?
Before actually answering the questions, I am going to suggest to see if you can get the latest version of the packages. The packages on the installation DVD may be really out of date and contain known vulernabilities, and other bugs. Can you use yumdownloader - in an online environment - to download the latest version onto a separate DVD and use that as the installation source? See https://access.redhat.com/solutions/10154 for more information.
To answer the questions themselves:
Requires: foo can refer to a package foo or a "feature" foo. pkgconfig(kbproto) is a "feature" (or virtual requires). You can use yum/rpm to see what provides this. On my Fedora box, for example, rpm -q --provides xorg-x11-proto-devel shows that this package indeed provides pkgconfig(kbproto).
As for x86_64 vs noarch, it doesn't matter. noarch packages work everywhere. Other packages are restricted to the platform. So x86_64 only works on intel/amd x86 64-bit machines. Installing noarch should be fine in your case. If you only had a i686 package, though, that wouldn't be sufficient. You would have to find a x86_64 or noarch package.
Yes, there's a big difference between yum and pkg-config. They do completely different things. One is a system tool for installing RPM packages. The other is a tool for developers for using the right headers and compiler flags. If your concern is finding/installing RPMs, do not use pkg-config directly.
Do you have access to an online machine that can access the RHEL 7 yum repositories? On that machine, do something like this:
mkdir rhel7-packages
cd rhel7-packages
yum provides '*/X11/Xlib.h' # make a note of the package that provides this file. it's libX11-devel on Fedora here
yumdownloader --resolve libX11-devel # download libX11-devel and all dependencies not installed on the system
Then copy/install the RPMs on the machine without internet access.
It's probably printing out xcb twice because it's two different requirements. The unversioned requirement will be satisfied if you install any verison of xcb. The versioned requirement will only be satisfied if you install 1.1.92. If you install 1.1.92, it will satisified both the requirements.
1.
You have to resolve the dependency on the system where you are building your package. This means you need to have those dependencies installed, inclusing libX11-devel. To do that, download the RPMs manually from EL7 repos to local disk and run this:
$ mkdir -p /tmp/libX11_dep_rpms && cd /tmp/libX11_dep_rpms
# Download all dependencies from here. All your packages should be available here:
# http://mirror.centos.org/centos-7/7/os/x86_64/Packages/
# Then install
$ yum localinstall *.rpm
# After this you should be able to build your qt4 package, provided all dependencies are resolved. Otherwise, repeat the procedure for all dependencies
# If you can't download packages, then you need to create a FULL DVD ISO that will contain all packages.
2.
pkgconfig ensures that a requirement is coming from a particular build that provides a particular version of the library. Here are some detail.
3.
Get the Everything ISO from EL7.
4.
This has to do with the pkgconfig and library versions.

Ubuntu: install latest version of package

I'm working with Ubuntu 14.04 and I need to use stress-ng.
If I type: apt-cache policy stress-ng
I obtain:
stress-ng:
Installed: 0.03.15-1~ubuntu14.04.1
Candidate: 0.03.15-1~ubuntu14.04.1
Version table:
*** 0.03.15-1~ubuntu14.04.1 0
100 http://mirror.switch.ch/ftp/mirror/ubuntu/ trusty-backports/universe amd64 Packages
100 /var/lib/dpkg/status
So if I run apt-get install stress-ng, it downloads version 0.03.15.
Unfortunately, this version does not allow me to do some things which are present in the last one, 0.07.16, supported by Ubuntu 17.04.
How can I do to use this latest version on 14.04?
You can add the repositories of the newer release to sources.list,and use apt-pinning,this is an advanced feature to install packages from a newer version of Ubuntu.
Check out Pinning.
Pinning is a process that allows you to remain on a stable release of
Ubuntu (or any other debian system) while grabbing packages from a
more recent version.
Note however that the processes described below will only work if
things like libc6 versions match, so you should probably not do this
on an Ubuntu system. I strongly recommend you look at UbuntuBackports
before doing this.
Also you can just download the package and make install.
Hope this helps.

Linux - /usr/local/nagios/bin/nagios file couldnt create

I am trying to install nagios 4.0.6 and nagios -plugins-2.0.2 on fedora 17.
I have followed steps which is mentioned in sourceforge documentation.
http://nagios.sourceforge.net/docs/3_0/quickstart-fedora.html
unfortunately /usr/local/nagios/bin/nagios this file isnt created I mean even bin folder haven't created. so that I am unable to start nagios service.
What should I do?
You can install Nagios right from the Fedora repositories.
yum install nagios nagios-plugins
You can also see a list of Nagios-related packages with: yum search nagios.
I suggest you always install apps from the repositories, since the package manager will take care of the dependencies as well as the installation, and the packages there have been already revised and tested for the version of your OS. Use only 3rd party source builds or install/build the packages manually as a last resort.

System crash after oracle installation with yum

recently i tried to install oracle on my linux with apt (I never used yum before) using fast manual:
http://www.oracle.com/technetwork/articles/servers-storage-admin/ginnydbinstallonlinux-488779.html
And after command:
sudo yum install oracle-rdbms-server-11gR2-preinstall
I got error:
Failed: ca-certificates.noarch 0:2010.63-3.el6_1.5 chkconfig.x86_64 0:1.3.49.3-2.el6 file-libs.x86_64 0:5.04-15.el6 filesystem.x86_64 0:2.4.30-3.el6
initscripts.x86_64 0:9.03.38-1.0.1.el6_4.2
Complete!
And something gone wrong because command like: ps, top are crashing
login#Ass-K55VJ:/etc/yum/repos.d$ ps -e
ps: relocation error: ps: symbol procps_number_version, version _3_2_5 not defined in file libproc-3.2.8.so with link time reference
login#Ass-K55VJ:/etc/yum/repos.d$ top
Segmentation fault (core dumped)
then I tryied to uninstall oracle and dependencies but after command:
sudo yum remove oracle-rdbms-server-11gR2-preinstall
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Jul 10 2013, 06:42:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq
So it seems like yum install in my system new libraries but didn't link it correctly? I dont know what do in this moment because it seems like armagedon on my ubuntu...
Does this mean you're on ubuntu and tried to install rpm packages using yum? The manual you used is for Oracle Linux 6, why would you try that on ubuntu?
rpm packages are not compatible with debian based systems like ubuntu, which use deb packages. So you've probably screwed your system big time, overwriting important system libraries with incompatible ones.
If apt-get is still working, then you can try to reinstall (apt-get --reinstall install) the equivalent libraries to the ones mentioned in the install manual you linked to - naming isn't always the same for rpm and deb packages. dpkg -l should help you see which the correct installed libraries are. I'd start with the C libraries (libc) etc.
But if apt-get is screwed also, then you'd need to download the packages manually from an ubuntu mirror and install them using dpkg, but I think a reinstall (or restore from backup if you have one) would be the best option.

Building Vim .debs on Ubuntu

From the vim site:
sudo apt-get install mercurial libssl-dev
sudo apt-get build-dep vim
hg clone http://hg.debian.org/hg/pkg-vim/vim
cd vim
hg checkout unstable
debian/rules update-orig
dpkg-buildpackage -i -I
cd ..
It looks like there are no commands called debian/rules on my system.
The wikia vim tips site is not complete and ignores all the hard work of packagers of vim. The standard way to build a Debian or Ubuntu binary package is from a source package. Using source packages are by far a better solution for most people.
pkg_basics.en.html#s-sourcebuild
The upstream site https://code.google.com/p/vim/ is indeed hosted with mercurial and there is a github clone https://github.com/b4winckler/vim however very few people really need the most bleeding edge sources. The build-deps are pretty significant.
The Debian vim maintainers also use mercurial to maintain their packaging per debian/README.source at http://hg.debian.org/hg/pkg-vim/vim and Debian developers with commit access can help with the packaging that uses quilt to maintain patches at the URL ssh://hg.debian.org/hg/pkg-vim/vim Information about the Debian binary packages created from hg.debian.org (also used as a base for Ubuntu) can be found: http://packages.debian.org/search?keywords=vim
For Ubuntu a much better way is using a PPA (personal package archive) of someone that is familiar with the 7.4 sources, how packaging works, the latest patches and the latest dependencies. Very recently (Aug 2013) vim 7.4 landed in the future Ubuntu 13.10 Saucy archive available for everyone to install using standard methods so no effort is needed at all. https://launchpad.net/ubuntu/+source/vim Quite a few PPAs contain vim builds already. https://launchpad.net/ubuntu/+ppas?name_filter=vim but there are not many current 7.4 builds backported all the way to Ubuntu 12.04 LTS Precise yet as described https://help.ubuntu.com/community/UbuntuBackports and https://wiki.ubuntu.com/StableReleaseUpdates. As described in the following bug I tried to build it for Ubuntu 12.04 LTS precise since that is what I use on my main machine. With a three line patch I got it working. I haven't put it up in a PPA yet. The bug formally requests the backport so if you care about this please vote it up and/or comment on it so the bug will get more attention. https://bugs.launchpad.net/bugs/1211971
If you find a PPA you like, for example like this one https://launchpad.net/~cjohnston/+ppa-packages you can add it by typing "sudo apt-add-repository ppa:cjohnston/ppa; sudo apt-get update; sudo apt-get upgrade".

Resources