install sqlite3 dev and other packages in centos - linux

I am trying to install sqlite dev and other libraries in a centos machine with cpanel, to be able to compile an application.
I am more acquainted with debian than centos, and I know the libraries I need are:
libsqlite3-dev
libkrb5-dev
libssl-dev
libcurl3-dev
libboost-all-dev
For what I could find online, the corresponding package in centos for libsqlite3-dev is sqlite-dev.
However, when I run yum install sqlite-devel I get the following message:
No package sqlite-devel available
I don't know if this is related to cpanel, if repositories are missing from the installation, and since my experience with yum is far lesser than with apt, I am quite lost here.
I have searched for the package yum search sqlite and all I get is this:
cpanel-perl-522-DBD-SQLite.x86_64 : CPAN module - Self Contained SQLite RDBMS in a DBI Driver
cpanel-perl-522-DBD-SQLite2.x86_64 : CPAN module - Self Contained RDBMS in a DBI Driver (sqlite 2.x)
ea-apr-util-sqlite.x86_64 : APR utility library SQLite DBD driver
freeradius-sqlite.x86_64 : SQLite support for freeradius
golang-googlecode-sqlite-devel.x86_64 : Trivial sqlite3 binding for Go
perl-DBD-SQLite.x86_64 : SQLite DBI Driver
cpanel-perl-522-CPAN-SQLite.x86_64 : CPAN module - maintain and search a minimal CPAN database
sqlite.x86_64 : Library that implements an embeddable SQL database engine
Also, this is the output of yum repolist
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 208.100.0.204
* base: repo.us.bigstepcloud.com
* epel: mirror.steadfast.net
* extras: mirror.eboundhost.com
* updates: centos.firehosted.com
repo id repo name status
EA4/7/x86_64 EA4 ( EasyApache 4 ) 23703
base/7/x86_64 CentOS-7 - Base 9319+44
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 10524+779
extras/7/x86_64 CentOS-7 - Extras 266
updates/7/x86_64 CentOS-7 - Updates 1086
repolist: 44898
As an additional detail, this server is not managed or owned by me, so I don't know much information about it.
What I know is that I have several centos + cpanel servers, and I just did a yum search sqlite-devel in another one, and it shows the package in the base repo.
I have also noticed that the offending server is not updated. Can this be a reason?
Any other hints?

Late response, but perhaps this might help others who eventually stumble on this question looking for the same answer.
The sqlite3 development package can be found in the epel repo. EPEL
Easy to install on CentOS -> yum install epel-release
$ yum list | grep sqlite
libsqlite3x-devel.x86_64 20071018-20.el7 #epel
Similar list/grep can be done for the other libraries you are looking to install, although the names are most likely just slightly different (list edited for clarity).
$ yum list | grep boost
boost-devel.x86_64 1.53.0-26.el7 base

For my case, I had to do yum install libsqlite3x-devel.x86_64

For Centos and Fedora with dnf package manager you can use "dnf search" followed by a keyword to search, in this case "sqlite"
dnf search sqlite | grep devel
For RPM based systems(Redhat / CentOS / Fedora) "-devel" is the suffice used to identify package with development files, usually refered as development tools, so I use grep to filter the result list.
These commands return me:
qlite-devel.x86_64 : Development tools for the sqlite3 embeddable SQL database engine
If you don't see the 3 explicit neither in the name or description you can get the info that confirm you this with "dnf info" followed by the package name:
dnf info sqlite-devel
which return more info like the version, license, etc.
Note:
Of course for Fedora is possible that sqlite package comes available due to the fact that fedora has it in its repo otherwise you would have to enable Epel repository as described by Eric in Epel
References:
https://docs.fedoraproject.org/en-US/Fedora/24/html/System_Administrators_Guide/sec-Displaying_Package_Information.html
https://en.wikipedia.org/wiki/RPM_Package_Manager

Related

openSUSE 15.4 zypper error installing postgreSQL

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

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.

Target not found: mingw-w64-x86_64-flickcurl

I'm using MSYS2, and I was expecting to be able to install flickcurl.
I tried installing as follows, but it seems that it can't find the file.
$ pacman -S mingw-w64-x86_64-flickcurl
error: target not found: mingw-w64-x86_64-flickcurl
Am I missing something here?
Probably your MSYS2 is outdated (think of it like Linux package manager which you update before installing stuff), you should run following commands and if you are asked to close terminal do it:
update-core - this one will fail if your MSYS2 is not very old, this is a good sign
pacman -Syu - you might have to repeat it until you see there is nothing to do; it updates your installed packages
pacman -S mingw-w64-x86_64-flickcurl
Those packages should be available after those steps:
$ pacman -Ss flickcurl
mingw32/mingw-w64-i686-flickcurl 1.26-1
Flickcurl is a C library for the Flickr API (mingw-w64)
mingw64/mingw-w64-x86_64-flickcurl 1.26-1
Flickcurl is a C library for the Flickr API (mingw-w64)
Commands explained:
update-core - used in the past to upgrade core packages, now removed since pacman does it
better
pacman -S <package_name> - checks local database for package
and installs it if it's found (will fail if there is no database or
it's outdated)
pacman -Su - compares installed packages to the
database searching for updates (will also fail if there is no
database or it's outdated)
pacman -Sy - downloads database with
available packages
pacman -Syu - downloads database and searches
for update, recommend way of upgrading
Final note:
MSYS2 doesn't support partial upgrades for the same reasons as Like Arch Linux. That means you should run pacman -Syu before installing package.

shared libraries libgconf-2.so.4 is missing

I want to install chromedriver in one of the AWS EC2 instance which is linux(Red Hat Enterprise Linux Server release 6.7 Santiago - 64 bit). While installing the chromedriver, we ran into issue due to missing packages. I could find the package here but this in turn requires many other packages. Using any other AMI is not an option.
Error is -
error while loading shared libraries libgconf-2.so.4 cannot open shared object file
I am using Ubuntu x64 and yum didn't work for me. But I found somebody mentioning simply use
$sudo apt install libgconf-2-4
worked for me to install the libgconf.
Please ask yum for the file, libgconf-2.so.4 : $ yum provides */libgconf-2.so.4
Install GConf2 : # yum install GConf2
Packages http://mirror.centos.org/centos/6.8/os/ ... and updates http://mirror.centos.org/centos/6.8/updates/
The chromedriver depends on the same packages / files as GConf2, and then some. Please see for yourself : $ ldd chromedriver , where 'chromedriver' is the unzipped executable.
EDIT :
Solution for the chromedriver issue : Install a chromedriver for RHEL 6, chromedriver-31.0.1650.63-1.el6.x86_64.rpm https://drive.google.com/file/d/0B7S255p3kFXNX1c0UWlGOWpZOHM/view?usp=sharing
Please download the package, and 1) cd Downloads/ 2) yum install chromedriver-31.0.1650.63-1.el6.x86_64.rpm ... and you have /usr/local/bin/chromedriver
P.S. : The EL6 chromedriver was built from the source package chromium-31.0.1650.63-1.el6.src.rpm
You might want to read this CentOS thread about your GLIBCXX_3.4.15. Especially apropos is this answer on the thread, especially the FAQ it references.
CentOS (which aims to be as compatible with RHEL as possible) is a curated LTS distribution (as is RHEL). You might find a version of chromedriver compiled for RHEL 6 in one of the many repositories. If not, you'll probably have to build it yourself.

CentOS mod_fastcgi

I have server with installed CentOS 6.2 with nginx and php-fpm from remi repos
httpd also installed, but when I try to install mod_fastcgi yum sais that no pachage availiable
How I can install mod_fastcgi??? Googling different sites says that command
yum install mod_fastcgi
must install this package. But yum sais:
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* epel: mirror.cogentco.com
* remi: remi-mirror.dedipower.com
196 packages excluded due to repository priority protections
Setting up Install Process
No package mod_fastcgi available.
Error: Nothing to do
There don't appear to be any official packages for mod_fastcgi. It seems that RedHat would prefer that you use mod_fcgid, but it's missing an important feature, the ability to use an external FastCGI server process (not managed by Apache) such as PHP-FPM.
From http://www.garron.me/en/linux/apache-mpm-worker-php-fpm-mysql-centos.html, I found that
you can download unofficial mod_fastcgi RPMs from the RPMForge/RepoForge repository:
sudo rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
sudo rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
sudo yum install mod_fastcgi
I have tested them lightly and they work for me.
You should be able to do an install from source. Try following the instructions here:
http://www.cyberciti.biz/tips/rhel-centos-fedora-apache2-fastcgi-php-configuration.html
I've successfully used these instructions on Centos.
install mod_fcgid from epel repository
# yum --enablerepo=epel info mod_fcgid
Available Packages
Name : mod_fcgid
Arch : x86_64
Version : 2.2
Release : 11.el5
Size : 58 k
Repo : epel
Summary : Apache2 module for high-performance server-side scripting
URL : http://fastcgi.coremail.cn/
License : GPL+
Description: mod_fcgid is a binary-compatible alternative to the Apache module mod_fastcgi.
: mod_fcgid has a new process management strategy, which concentrates on reducing
: the number of fastcgi servers, and kicking out corrupt fastcgi servers as soon
: as possible.

Resources