How to uninstall RPM without dependencies error in cent os? - linux

I installed the openssl rpm some long days ago. After that i am unable to uninstall the rpm so that i deleted the /usr/bin/openssl folder manually.Though I deleted it manually, when i grep using this command rpm -qa openssl i can find the rpm.
But when i execute the openssl command in terminal it is showing bash: openssl: command not found...
When try to uninstall i am getting following error
[root#genius ~]# rpm -qa openssl
openssl-1.0.2k-8.el7.x86_64
[root#genius ~]# rpm -e openssl-1.0.2k-8.el7.x86_64
error: Failed dependencies:
/usr/bin/openssl is needed by (installed) authconfig-6.2.8-30.el7.x86_64
And also when i am tryiong to install the rpm it is showing that following output
[root#genius openssl]# rpm -ivh openssl-1.0.2k-8.el7.x86_64.rpm
Preparing... ################################# [100%]
package openssl-1:1.0.2k-8.el7.x86_64 is **already installed**
Finally,
I need the openssl package should be installed in my centOS 7 or else i need to remove the openssl package completely without any dependencies error.

You have a couple of options here:
1. Remove using yum, Note: this may remove the dependency such as authconfig
$ yum remove openssl
2. Remove using rpm cmdline, but you have to force remove it. This will not remove the depencies
$ rpm -e openssl-1.0.2k-8.el7.x86_64 --nodeps
3. or try a reinstall if you have CentOS-7 repo
$ yum reinstall openssl
If you want openssl in your system, I would try (3) first. If that doesn't work, try (2) and then do a yum install openssl. (3) and (1) are the options to use. (2) will cause the dependency package to stay in the system and the dependent package may malfunction.

Related

How to compile a C file with an OpenSSL dependency? [duplicate]

I'm trying to build some code on Ubuntu 10.04 LTS that uses OpenSSL 1.0.0. When I run make, it invokes g++ with the "-lssl" option. The source includes:
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/des.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
I ran:
$ sudo apt-get install openssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
But I guess the openssl package doesn't include the library. I get these errors on make:
foo.cpp:21:25: error: openssl/bio.h: No such file or directory
foo.cpp:22:28: error: openssl/buffer.h: No such file or directory
foo.cpp:23:25: error: openssl/des.h: No such file or directory
foo.cpp:24:25: error: openssl/evp.h: No such file or directory
foo.cpp:25:25: error: openssl/pem.h: No such file or directory
foo.cpp:26:25: error: openssl/rsa.h: No such file or directory
How do I install the OpenSSL C++ library on Ubuntu 10.04 LTS?
I did a man g++ and (under "Options for Linking") for the -l option it states: " The linker searches a standard list of directories for the library..." and "The directories searched include several standard system directories..." What are those standard system directories?
You want to install the development package, which is libssl-dev:
sudo apt-get install libssl-dev
Run:
apt-get install libssl-dev
All of these answers are very outdated and from when the package was still being developed. You can now just use the "normal" command listed below:
sudo apt install openssl
Edit: OP's question is poorly worded... after all, OpenSSL is a library itself, so I read his question too quickly before answering. The command above installs "normal" OpenSSL.
Toward the bottom of his question he mentions that make fails, suggesting he is compiling the package manually. And yes, even if you download the TAR ball, it will include all of the openssl and libssl files, which you can then make from.
What OP is really asking for is the OpenSSL Development Library, in which case you can first install OpenSSL using the above command, and then run this afterwards:
sudo apt install libssl-dev
More info: https://linuxtect.com/how-to-install-openssl-libraries-on-ubuntu-debian-mint/
I found a detailed solution here: Install OpenSSL Manually On Linux
From the blog post...:
Steps to download, compile, and install are as follows (I'm installing version 1.0.1g below; please replace "1.0.1g" with your version number):
Step – 1 : Downloading OpenSSL:
Run the command as below :
$ wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
Also, download the MD5 hash to verify the integrity of the downloaded file for just varifacation purpose. In the same folder where you have downloaded the OpenSSL file from the website :
$ wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz.md5
$ md5sum openssl-1.0.1g.tar.gz
$ cat openssl-1.0.1g.tar.gz.md5
Step – 2 : Extract files from the downloaded package:
$ tar -xvzf openssl-1.0.1g.tar.gz
Now, enter the directory where the package is extracted like here is openssl-1.0.1g
$ cd openssl-1.0.1g
Step – 3 : Configuration OpenSSL
Run below command with optional condition to set prefix and directory where you want to copy files and folder.
$ ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
You can replace “/usr/local/openssl” with the directory path where you want to copy the files and folders. But make sure while doing this steps check for any error message on terminal.
Step – 4 : Compiling OpenSSL
To compile openssl you will need to run 2 command : make, make install as below :
$ make
Note: check for any error message for verification purpose.
Step -5 : Installing OpenSSL:
$ sudo make install
Or without sudo,
$ make install
That’s it. OpenSSL has been successfully installed. You can run the version command to see if it worked or not as below :
$ /usr/local/openssl/bin/openssl version
OpenSSL 1.0.1g 7 Apr 2014
How could I have figured that out for
myself (other than asking this
question here)? Can I somehow tell
apt-get to list all packages, and grep
for ssl? Or do I need to know the
"lib*-dev" naming convention?
If you're linking with -lfoo then the library is likely libfoo.so. The library itself is probably part of the libfoo package, and the headers are in the libfoo-dev package as you've discovered.
Some people use the GUI "synaptic" app (sudo synaptic) to (locate and) install packages, but I prefer to use the command line. One thing that makes it easier to find the right package from the command line is the fact that apt-get supports bash completion.
Try typing sudo apt-get install libssl and then hit tab to see a list of matching package names (which can help when you need to select the correct version of a package that has multiple versions or other variations available).
Bash completion is actually very useful... for example, you can also get a list of commands that apt-get supports by typing sudo apt-get and then hitting tab.
Another way to install openssl library from source code on Ubuntu, follows steps below, here WORKDIR is your working directory:
sudo apt-get install pkg-config
cd WORKDIR
git clone https://github.com/openssl/openssl.git
cd openssl
./config
make
sudo make install
# Open file /etc/ld.so.conf, add a new line: "/usr/local/lib" at EOF
sudo ldconfig
You want the openssl-devel package.
At least I think it's -devel on Ubuntu. Might be -dev. It's one of the two.
As a general rule, when on Debian or Ubuntu and you're missing a development file (or any other file for that matter), use apt-file to figure out which package provides that file:
~ apt-file search openssl/bio.h
android-libboringssl-dev: /usr/include/android/openssl/bio.h
libssl-dev: /usr/include/openssl/bio.h
libwolfssl-dev: /usr/include/cyassl/openssl/bio.h
libwolfssl-dev: /usr/include/wolfssl/openssl/bio.h
A quick glance at each of the packages that are returned by the command, using apt show will tell you which among the packages is the one you're looking for:
~ apt show libssl-dev
Package: libssl-dev
Version: 1.1.1d-2
Priority: optional
Section: libdevel
Source: openssl
Maintainer: Debian OpenSSL Team <pkg-openssl-devel#lists.alioth.debian.org>
Installed-Size: 8,095 kB
Depends: libssl1.1 (= 1.1.1d-2)
Suggests: libssl-doc
Conflicts: libssl1.0-dev
Homepage: https://www.openssl.org/
Tag: devel::lang:c, devel::library, implemented-in::TODO, implemented-in::c,
protocol::ssl, role::devel-lib, security::cryptography
Download-Size: 1,797 kB
APT-Sources: http://ftp.fr.debian.org/debian unstable/main amd64 Packages
Description: Secure Sockets Layer toolkit - development files
This package is part of the OpenSSL project's implementation of the SSL
and TLS cryptographic protocols for secure communication over the
Internet.
.
It contains development libraries, header files, and manpages for libssl
and libcrypto.
N: There is 1 additional record. Please use the '-a' switch to see it
Go to the official website and download the source code for the version you need
Then unzip the update package and execute the following command
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl -Wl,-rpath,/usr/local/ssl/lib shared
Because the default is to generate only static libraries, if you want dynamic libraries, add the "shared" option
make && make install
sudo apt-get install libcurl4-openssl-dev

RPM installation on redhat 6.3 failed

I am trying to install unixODBC-2.2.14-11.el6.x86_64.rpm on redhat 6.3. It gives me the following output:
[root#localhost khan]# yum install unixODBC-2.2.14-11.el6.x86_64.rpm
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Repository InstallMedia is listed more than once in the configuration
Setting up Install Process
Examining unixODBC-2.2.14-11.el6.x86_64.rpm: unixODBC-2.2.14-11.el6.x86_64
unixODBC-2.2.14-11.el6.x86_64.rpm: does not update installed package.
Error: Nothing to do
But when I try to query it by #rpm -q unixODBC-2.2.14-11.el6.x86_64.rpm,
it gives the output as:
package unixODBC-2.2.14-11.el6.x86_64.rpm is not installed
You are misusing the rpm command. With the -q option, rpm receives a package name, not a file name. Drop the .rpm from the end, and you should be OK:
$ rpm -q unixODBC-2.2.14-11.el6.x86_64

xz compression install on centos

Any installation or update using yum command I ended up error: Error: xz compression not available. On website I read that Python library is missing. When you try to install a library (sudo yum update pyliblzma) again failed with error. Do not know how? Thanks.
This problem comes if you installed a wrong epel release on your machine. If so, then you need to remove the epel release by
yum remove epel-release
Sometimes that is not enough, you need to remove the cache as well by:
rm -rf /var/cache/yum/x86_64/6/epel
Then you can install the epel-release again
yum -y install epel-release
You need install the EPEL repository by downloading the appropriate RPM package for your system and installing it. For example, for CentOS and Red Hat Enterprise Linux 6.x:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.
Finally, install the Python library:
yum install pyliblzma
This works perfecly in my CentOS 6.x.
I've found a solution on this page of stackexchange, working in CentOS 6.X:
https://unix.stackexchange.com/a/314756
sudo rpm -e epel-release-7-5.noarch
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum clean all
sudo rpmdb -v --rebuilddb
sudo yum -y install libselinux-python
I was also suffering from this issue..
If you are installing packages but it is already available on your system.
Remove existing packages and then try to install new.
It will work properly...
I was able to solve this problem by installing pyliblzma using rpm instead of yum as yum is not working.
Find pyliblzma rpm package according to your architecture and install it using the command.
rpm -Uvh pyliblzma-version-release.architecture.rpm
I used the following command to install pyliblzma for my 64 bit Redhat 6.8 machine. Please check URL in the command and make changes accordingly.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/pyliblzma-0.5.3-3.el6.x86_64.rpm
In my case the issue was caused by missing modules in python's site-packages directory. Here's what I did:
$ rpm -Va
to get a list of all files belonging to all rpms that do not verify. I got a bunch of messages about missing modules:
missing /usr/lib64/python2.7/site-packages/...
Luckily, I had an identical CentOS version elsewhere with all these packages present, so I just copied them over and ran
$ rpmdb -v --rebuilddb
to rebuild rpm database.

Linux CentOS YUM Error Package Requires - libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit)

I'm getting errors when I try to do a "yum update" that I'm unsure how to resolve. Below is the error message:
--> Finished Dependency Resolution
Error: Package: nginx-1.4.7-1.el6.ngx.x86_64 (nginx)
Requires: libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit)
When I try to upgrade (which I believe is the best step forward) it these me there is "nothing to do" - like using the following line:
like:
sudo yum reinstall openssl
or:
sudo yum install http://mirror.centos.org/centos/6/os/x86_64/Packages/openssl-1.0.1e-15.el6.x86_64.rpm
Examining /var/tmp/yum-root-qbBKfF/openssl-1.0.1e-15.el6.x86_64.rpm: openssl-1.0.1e-15.el6.x86_64
/var/tmp/yum-root-qbBKfF/openssl-1.0.1e-15.el6.x86_64.rpm: does not update installed package.
Error: Nothing to do
I have tried cleaning out the YUM database
rpm -e --justdb --nodeps openssl
and
sudo rpm -ivh --force http://mirror.centos.org/centos/6.5/updates/x86_64/Packages/openssl-1.0.1e-16.el6_5.4.x86_64.rpm
and these both appear to put on the required packages when I run "rpm -q --provides openssl" however I then get this error message in YUM:
sudo yum update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/lib64/libcrypto.so.10: version `OPENSSL_1.0.1_EC' not found (required by /usr/lib64/libssl.so.10)
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.9 (unknown, Feb 24 2014, 11:42:49)
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
Can anyone suggest anyother things I should try?
I can't seem to update, force an update, clean Yum DB and reinstall. The clean DB and Force do get the package on but them YUM can't find what OPENSSL_1.0.1_EC package it needs.
I tried upgrading with these 2 packages:
http://mirror.centos.org/centos/6.5/updates/x86_64/Packages/openssl-1.0.1e-16.el6_5.4.x86_64.rpm
http://mirror.centos.org/centos/6/os/x86_64/Packages/openssl-1.0.1e-15.el6.x86_64.rpm
you seem to have non-stock openssl packages installed (perhaps ptudor's?) they do NOT PROVIDE OPENSSL_1.0.1_EC since he drops openssl-1.0.1e/version.map.fips-ec entirely.
One possible fix is to add the provide to the custom openssl packages of yours this way:
--- openssl-1.0.1e-version.patch 2014-06-06 11:52:55.772046103 +0200
+++ new_openssl-1.0.1e-version.patch 2014-06-06 11:52:40.854045438 +0200
## -61,4 +61,12 ##
+ _original*;
+ _current*;
+};
++OPENSSL_1.0.1_EC {
++ global:
++ EC*;
++};
should add the required PROVIDE to the lib. I offered that solution to him but he did not like it.
https://github.com/ptudor/centos6-openssl/issues/4
Or else you have to rebuild the nginx packages to link against your custom openssl.

dependency check failure on oracle linux

i am new on linux. i am using oracle linux... el5. i am trying to install oracle 11g.
i have to install some packets for pre-installation task. ex: compat-libstdc++-33-3.2.3
i downloaded the rpm file and tried to install but i got a dependency check failure.
i have a later version of glibc as it can be seen below. what should i do? sould i install ALL the dependencies even if i had a later version?
[root#localhost ferhat]# rpm -iv compat-libstdc++-33-3.2.3-61.x86_64.rpm
warning: compat-libstdc++-33-3.2.3-61.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
libc.so.6()(64bit) is needed by compat-libstdc++-33-3.2.3-61.x86_64
libc.so.6(GLIBC_2.2.5)(64bit) is needed by compat-libstdc++-33-3.2.3-61.x86_64
libc.so.6(GLIBC_2.3)(64bit) is needed by compat-libstdc++-33-3.2.3-61.x86_64
libgcc_s.so.1()(64bit) is needed by compat-libstdc++-33-3.2.3-61.x86_64
libgcc_s.so.1(GCC_3.0)(64bit) is needed by compat-libstdc++-33-3.2.3-61.x86_64
libgcc_s.so.1(GCC_3.3)(64bit) is needed by compat-libstdc++-33-3.2.3-61.x86_64
libm.so.6()(64bit) is needed by compat-libstdc++-33-3.2.3-61.x86_64
[root#localhost ferhat]#
[root#localhost ferhat]#
[root#localhost ferhat]# rpm -q glibc
glibc-2.5-49
[root#localhost ferhat]# rpm -q gcc
gcc-4.1.2-48.el5
Regards...
Use your package manager instead of pure RPM for installing. What is it in your distribution, yum?

Resources