Building apr-utils from Source on CentOS 7 -- dependancy issue - linux

Im attempting to build apr-utils-1.6.1 from source on CentOS 7 (with the goal to get httpd-2.4.29) but I'm stuck with a dependancy issue:
# rpmbuild -tb apr-util-1.6.1.tar.bz2
error: Failed build dependencies:
db4-devel is needed by apr-util-1.6.1-1.x86_64
db4-devel isn't available in yum and libdb-devel provides version 5, which doesn't meet the dependency requirement.
I've tried downloading and installing db4-devel, but that has it's own dependencies that I can't meet:
# rpm -iv db4-devel-4.7.25-22.el6.x86_64.rpm
warning: db4-devel-4.7.25-22.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
db4 = 4.7.25-22.el6 is needed by db4-devel-4.7.25-22.el6.x86_64
db4-cxx = 4.7.25-22.el6 is needed by db4-devel-4.7.25-22.el6.x86_64
libdb-4.7.so()(64bit) is needed by db4-devel-4.7.25-22.el6.x86_64
libdb_cxx-4.7.so()(64bit) is needed by db4-devel-4.7.25-22.el6.x86_64
Trying to install db4 fails too because the the Berkely DB version 5 is already installed and in use on CentOS 7:
# rpm -iv db4-4.7.25-22.el6.x86_64.rpm
warning: db4-4.7.25-22.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
db4 < 5 is obsoleted by (installed) libdb-5.3.21-20.el7.x86_64
I'm not really sure how to proceed at this point. Do I just have to cut my losses and deploy a CentOS 6 box? It seems that CentOS 6 still has db4. I was thinking of modifying the spec file to remove the db4 requirement, but I'm not sure of the implications of that, or how to even do that properly.
Thanks.

rpmbuild -tb apr-util-1.6.1.tar.bz2
No spec file, but apr-util-1.6.1/build/rpm/apr-util.spec.in
Better use a source with a regular apr-util.spec file : apr-util-1.6.1-1.fc27.src.rpm http://dl.fedoraproject.org/pub/fedora/linux/updates/27/SRPMS/Packages/a/apr-util-1.6.1-1.fc27.src.rpm
Please do not build rpm packages as root, setup an unprivileged rpmbuild environment in /home/name/ : https://www.linuxquestions.org/questions/linux-software-2/need-rpm-package-for-php-version-5-2-7-and-up-on-redhat-5-1-a-766486/#13
Unpack the source with $ rpm -Uvh apr-util-1.6.1-1.fc27.src.rpm ... and $ cd rpms/SPECS/ ... edit 'apr-util.spec' to the new dependencies, and give it a try : $ rpmbuild -bb apr-util.spec

In Redhat release 7.5 is required to install the db4-devel package but it was replaced with libdb-devel. The below steps are necessary to create the packages for apr-util from the tar-ball file
yum install libdb-devel
rpmbuild -tb apr-util-1.6.1.tar.bz2
cd ~/rpmbuild
rm -rf BUILD BUILDROOT RPMS SRPMS
cp ../ apr-util-1.6.1.tar.bz2 SOURCES/
cd SPECS
vim apr-util.spec and replace db4-devel by libdb-devel
rpmbuild -bb apr-util.spec
cd ../RPMS/x86_64
All the packages for apr-util will be there.

Related

how to add custom path for rpm dependencies

I am trying to install some software that's required glib 2.14
so I installed it with this tutorial: How to upgrade glibc from version 2.12 to 2.14 on CentOS?
the problem is glib 2.14 path is /opt/glibc-2.14/lib/libc.so.6
so when I try to install software using rpm i still getting this error:
error: Failed dependencies:
libc.so.6(GLIBC_2.14)(64bit) is needed by xyz-4.6.6-1.x86_64
libc.so.6(GLIBC_2.15)(64bit) is needed by xyz-4.6.6-1.x86_64
libc.so.6(GLIBC_2.17)(64bit) is needed by xyz-4.6.6-1.x86_64
how can I add the custom path for rpm dependencies?
It would help a bit if you gave us the name of the package you are trying to install. You can't just provide a path, RPM checks if it's got any packages on record that provide these libraries, and there aren't any. Here are a couple methods you could use:
Use --nodeps
If you already know that you have everything that is required, using --nodeps is completely fine IMO.
Create virtual packages for the missing libraries (advanced)
You are missing the following libraries: libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.15)(64bit) libc.so.6(GLIBC_2.17)(64bit).
Here's an example .spec file to create a virtual package that claims to provide these libraries:
Name: libc-virtual-provides
Provides: libc.so.6(GLIBC_2.14)(64bit)
Provides: libc.so.6(GLIBC_2.15)(64bit)
Provides: libc.so.6(GLIBC_2.17)(64bit)
Version: 1.0
Release: 1
Summary: Virtual package providing libc 2.14, 2.15, 2.17
License: Public domain
%description
Virtual package providing libc 2.14, 2.15, 2.17
%prep
%files
%changelog
To create a virtual package from this SPEC file, first create some directories:
mkdir -p ~/rpmbuild/BUILD ~/rpmbuild/BUILDROOT ~/rpmbuild/RPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECS ~/rpmbuild/SRPMS
Then copy the SPEC file into ~/rpmbuild/SPECS, and build an RPM:
cp virtual-glibc-provides.spec ~/rpmbuild/SPECS
cd ~/rpmbuild/SPECS
rpmbuild -ba virtual-glibc-provides.spec
You'll get output like this:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.6Jni5u
+ umask 022
+ cd /home/.../rpmbuild/BUILD
+ exit 0
Processing files: glib2.14-virtual-provides-2.14-1.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/.../rpmbuild/BUILDROOT/glib2.14-virtual-provides-2.14-1.x86_64
Wrote: /home/.../rpmbuild/SRPMS/glib2.14-virtual-provides-2.14-1.src.rpm
Wrote: /home/.../rpmbuild/RPMS/x86_64/glib2.14-virtual-provides-2.14-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.YNj8gP
+ umask 022
+ cd /home/.../rpmbuild/BUILD
+ /bin/rm -rf /home/.../rpmbuild/BUILDROOT/glib2.14-virtual-provides-2.14-1.x86_64
+ exit 0
And you'll have your RPM under /home/.../rpmbuild/RPMS/, which you can then install using rpm -ivh ....rpm. You should then be able to install the other package without any problems.

How to uninstall RPM without dependencies error in cent os?

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.

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

Wind River Linux, Failed Dependency Error

I am working on Wind River Linux. Failed Dependency Error. Can anyone please tell me what I have to do ? I have been trying from past one day
root#AC-04:/home/mysql# rpm -ivh MySQL-server-5.6.33-1.linux_glibc2.5.x86_64.rpm
warning: MySQL-server-5.6.33-1.linux_glibc2.5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
/sbin/chkconfig is needed by MySQL-server-5.6.33-1.linux_glibc2.5.x86_64
/usr/lib64/mysql/plugin is needed by MySQL-server-5.6.33-1.linux_glibc2.5.x86_64
/usr/lib64/mysql/plugin/debug is needed by MySQL-server-5.6.33-1.linux_glibc2.5.x86_64
First of all, use -Uvh instead of -ivh when installing: -Uvh is almost (kernel is the one exception) the right way to install/upgrade rpm packages.
The final solution will be to find the packages that provide those dependencies using (if all else fails)
rpm -qP /sbin/chkconfig *.rpm
on the WRL packages, and make sure those packages are installed.
Those are all file/directpory dependencies. Try (e.g.)
rpm -qf --whatprovides /sbin/chkconfig
to see if there is a package that provides the file.
(Note: what follows "works" for RPM5 on WRL, not RPM on Fedora/RHEL)
You can stub out dependencies by doing (e.g.)
mkdir -p /etc/rpm/sysinfo
echo "/sbin/chkconfig" >> /etc/rpm/sysinfo/Requirename
Masking the dependencies will permit installation (so will --nodeps) and might help get you further along in debugging your packaging.

How to make rpm auto install dependencies

I have built two RPM packages
proj1-1.0-1.x86_64.rpm
libtest1-1.0-1.x86_64.rpm
proj1 depends on the file libtest1.so being present and it is reflected correctly in the RPM packages as seen here:
user#my-pc:~$ rpm -qp --requires proj1-1.0-1.x86_64.rpm
libtest1.so()(64bit)
user#my-pc:~$ rpm -qp --provides libtest1-1.0-1.x86_64.rpm
libtest1.so()(64bit)
The installation of proj1 fails due to a missing dependency.
user#my-pc:~$ rpm -ivh proj1-1.0-1.x86_64.rpm
error: Failed dependencies:
libtest1.so()(64bit) is needed by proj1-1.0-1.x86_64.rpm
How do I ensure that libtest1-1.0-1.x86_64.rpm is installed automatically during
the installation of proj1-1.0-1.x86_64.rpm?
I did try the --aid option with rpm -i as described here but it didn't work for me.
Is there any other way?
Thanks for any help.
The link #gertvdijk provided shows a quick way to achieve the desired results without configuring a local repository:
$ yum --nogpgcheck localinstall packagename.arch.rpm
Just change packagename.arch.rpm to the RPM filename you want to install.
Edit Just a clarification, this will automatically install all dependencies that are already available via system YUM repositories.
If you have dependencies satisfied by other RPMs that are not in the system's repositories, then this method will not work unless each RPM is also specified along with packagename.arch.rpm on the command line.
Create a (local) repository and use yum to have it resolve the dependencies for you.
The CentOS wiki has a nice page providing a how-to on this. CentOS wiki HowTos/CreateLocalRepos.
Summarized and further minimized (not ideal, but quickest):
Create a directory for you local repository, e.g. /home/user/repo.
Move the RPMs into that directory.
Fix some ownership and filesystem permissions:
# chown -R root.root /home/user/repo
Install the createrepo package if not installed yet, and run
# createrepo /home/user/repo
# chmod -R o-w+r /home/user/repo
Create a repository configuration file, e.g. /etc/yum.repos.d/myrepo.repo containing
[local]
name=My Awesome Repo
baseurl=file:///home/user/repo
enabled=1
gpgcheck=0
Install your package using
# yum install packagename
For dnf users just use dnf install *.rpm, localinstall is no longer needed.
For me worked just with
# yum install ffmpeg-2.6.4-1.fc22.x86_64.rpm
And automatically asked authorization to dowload the depedencies.
Below the example, i am using fedora 22
[root#localhost lukas]# yum install ffmpeg-2.6.4-1.fc22.x86_64.rpm
Yum command has been deprecated, redirecting to '/usr/bin/dnf install ffmpeg-2.6.4-1.fc22.x86_64.rpm'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'
Last metadata expiration check performed 0:28:24 ago on Fri Sep 25 12:43:44 2015.
Dependencies resolved.
====================================================================================================================
Package Arch Version Repository Size
====================================================================================================================
Installing:
SDL x86_64 1.2.15-17.fc22 fedora 214 k
ffmpeg x86_64 2.6.4-1.fc22 #commandline 1.5 M
ffmpeg-libs x86_64 2.6.4-1.fc22 rpmfusion-free-updates 5.0 M
fribidi x86_64 0.19.6-3.fc22 fedora 69 k
lame-libs x86_64 3.99.5-5.fc22 rpmfusion-free 345 k
libass x86_64 0.12.1-1.fc22 updates 85 k
libavdevice x86_64 2.6.4-1.fc22 rpmfusion-free-updates 75 k
libdc1394 x86_64 2.2.2-3.fc22 fedora 124 k
libva x86_64 1.5.1-1.fc22 fedora 79 k
openal-soft x86_64 1.16.0-5.fc22 fedora 292 k
opencv-core x86_64 2.4.11-5.fc22 updates 1.9 M
openjpeg-libs x86_64 1.5.1-14.fc22 fedora 89 k
schroedinger x86_64 1.0.11-7.fc22 fedora 315 k
soxr x86_64 0.1.2-1.fc22 updates 83 k
x264-libs x86_64 0.142-12.20141221git6a301b6.fc22 rpmfusion-free 587 k
x265-libs x86_64 1.6-1.fc22 rpmfusion-free 486 k
xvidcore x86_64 1.3.2-6.fc22 rpmfusion-free 264 k
Transaction Summary
====================================================================================================================
Install 17 Packages
Total size: 11 M
Total download size: 9.9 M
Installed size: 35 M
Is this ok [y/N]: y
I found a simpler solution. If you have all the RPMs in the same directory, all you need to do is,
$ sudo rpm -i *.rpm
rpm seems to figure out the correct order to install these and installs the RPMs.
Matthew's answer awoke many emotions, because of the fact that it still lacks a minor detail.
The general command would be:
# yum --nogpgcheck localinstall <package1_file_name> ... <packageN_file_name>
The package_file_name above can include local absolute or relative path, or be a URL (possibly even an URI).
Yum would search for dependencies among all package files given on the command line AND IF IT FAILS to find the dependencies there, it will also use any configured and enabled yum repositories.
Neither the current working directory, nor the paths of any of package_file_name will be searched, except when any of these directories has been previously configured as an enabled yum repository.
So in the OP's case the yum command:
# cd <path with pkg files>; yum --nogpgcheck localinstall ./proj1-1.0-1.x86_64.rpm ./libtest1-1.0-1.x86_64.rpm
would do, as would do the rpm:
# cd <path with pkg files>; rpm -i proj1-1.0-1.x86_64.rpm libtest1-1.0-1.x86_64.rpm
The differencve between these yum and rpm invocations would only be visible if one of the packages listed to be installed had further dependencies on packages NOT listed on the command line.
In such a case rpm will just refuse to continue, while yum would use any configured and enabled yum repositories to search for dependencies, and may possibly succeed.
The current working directory will NOT be searched in any case, except when it has been previously configured as an enabled yum repository.
Copy all your RPMs in a directory, then install as follows:
yum install -y --cacheonly --disablerepo=* /var/rpm_dir/*.rpm
For specific packages you can use yumdownloader, example in this other thread: https://stackoverflow.com/a/66927190/5078874
I ran into this and what worked for me was to run yum localinstall enterPkgNameHere.rpm from inside the directory where the .rpm file is located.
Note: replace the enterPkgNameHere.rpm with the name of your .rpm file.
In the case of openSUSE Leap 15, I'm receiving similar error:
> sudo rpm -i opera-stable_53.0.2907.68_amd64.rpm
[sudo] password for root:
warning: opera-stable_53.0.2907.68_amd64.rpm: Header V4 RSA/SHA512 Signature, key ID a5c7ff72: NOKEY
error: Failed dependencies:
at is needed by opera-stable-53.0.2907.68-0.x86_64
I run this command to figure out what are the dependencies:
> sudo zypper install opera-stable_53.0.2907.68_amd64.rpm
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 4 NEW packages are going to be installed:
at libfl2 libHX28 opera-stable
4 new packages to install.
Overall download size: 50.3 MiB. Already cached: 0 B. After the operation, additional 176.9 MiB will be used.
Continue? [y/n/...? shows all options] (y): n
Then I run this command to install dependencies:
> sudo zypper in at
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 3 NEW packages are going to be installed:
at libfl2 libHX28
3 new packages to install.
Overall download size: 208.6 KiB. Already cached: 0 B. After the operation, additional 600.4 KiB will be used.
Continue? [y/n/...? shows all options] (y): y
Then I run this to install the rpm file:
> sudo rpm -i opera-stable_53.0.2907.68_amd64.rpm
I'm not sure if it is the best practice, however it solved my issue.
Step1: copy all the rpm pkg in given locations
Step2: if createrepo is not already installed, as it will not be by default, install it.
[root#pavangildamysql1 8.0.11_rhel7]# yum install createrepo
Step3: create repository metedata and give below permission
[root#pavangildamysql1 8.0.11_rhel7]# chown -R root.root /scratch/PVN/8.0.11_rhel7
[root#pavangildamysql1 8.0.11_rhel7]# createrepo /scratch/PVN/8.0.11_rhel7
Spawning worker 0 with 3 pkgs
Spawning worker 1 with 3 pkgs
Spawning worker 2 with 3 pkgs
Spawning worker 3 with 2 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root#pavangildamysql1 8.0.11_rhel7]# chmod -R o-w+r /scratch/PVN/8.0.11_rhel7
Step4: Create repository file with following contents at /etc/yum.repos.d/mysql.repo
[local]
name=My Awesome Repo
baseurl=file:///scratch/PVN/8.0.11_rhel7
enabled=1
gpgcheck=0
Step5 Run this command to install
[root#pavangildamysql1 local]# yum --nogpgcheck localinstall mysql-commercial-server-8.0.11-1.1.el7.x86_64.rpm
Simple just run the following command.
sudo dnf install *package.rpm
Enter your password and you are done.
Process of generating RPM from source file:
1) download source file with.gz extention.
2) install rpm-build and rpmdevtools from yum install. (rpmbuild folder will be generated...SPECS,SOURCES,RPMS.. folders will should be generated inside the rpmbuild folder).
3) copy the source code.gz to SOURCES folder.(rpmbuild/SOURCES)
4)Untar the tar ball by using the following command.
go to SOURCES folder :rpmbuild/SOURCES where tar file is present.
command: e.g tar -xvzf httpd-2.22.tar.gz
httpd-2.22 folder will be generated in the same path. Check if apr and apr-util and there in httpd-2.22/srclib folder. If apr and apr-util doesnt exist download latest version from apache site ,untar it and put it inside httpd-2.22/srclib folder. Also make sure you have pcre install in your system .
5)go to extracted folder and then type below command:
./configure --prefix=/usr/local/apache2 --with-included-apr --enable-proxy --enable-proxy-balancer --with-mpm=worker --enable-mods-static=all
6)run below command once the configure is successful:
make
7)after successfull execution od make command run:
checkinstall
in tha same folder. (if you dont have checkinstall software please download latest version from site)
Also checkinstall software has bug which can be solved by following way:::::
locate checkinstallrc and then replace TRANSLATE = 1 to TRANSLATE=0 using vim command.
Also check for exclude package: EXCLUDE="/selinux"
8)checkinstall will ask for option (type R if you want tp build rpm for source file)
9)Done .rpm file will be built in RPMS folder inside rpmbuild/RPMS file...
ALL the BEST ....
Regards,
Prerana

Resources