LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing Package??? (https://www.linuxquestions.org/questions/linux-newbie-8/installing-package-646375/)

ajeetraina 06-02-2008 06:18 AM

Installing Package???
 
I have got src file for RHEL 4.0 through ftp://rpmfind.net/linux/redhat/enter...0.15-1.src.rpm.
How to install it on my system??

MS3FGX 06-02-2008 06:29 AM

Well you would install it like any other RPM, but since it is source and not binary you will need to compile it.

ajeetraina 06-02-2008 06:30 AM

I supplied #rpmbuild --rebuild <pkgname>
Its doesnt display anything...

What does $rpmbuild -bb indicates??

megerdin 06-02-2008 06:37 AM

If everything ok just follow this command

Quote:

#rpm -Uvh xxxxx.src.rpm
#cd/usr/src/redhat/SPECS

#rpmbuild -bb xxxxx.spec

#cd ../RPMS/i386

#rpm -Uvh xxxxx.i386.rpm
Hope u done.

ajeetraina 06-02-2008 07:23 AM

I am in verse of installing MRTG package and your way of building worked But when I ran the last command it says:
Code:

+ cd mrtg-2.10.15
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /var/tmp/mrtg-2.10.15-root
+ mkdir -p /var/tmp/mrtg-2.10.15-root/etc/mrtg
+ mkdir -p /var/tmp/mrtg-2.10.15-root/etc/cron.d
+ mkdir -p /var/tmp/mrtg-2.10.15-root/var/lib/mrtg
+ mkdir -p /var/tmp/mrtg-2.10.15-root/var/lock/mrtg
+ mkdir -p /var/tmp/mrtg-2.10.15-root/var/www/mrtg
+ mkdir -p /var/tmp/mrtg-2.10.15-root/usr/bin
+ mkdir -p /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/Pod
+ mkdir -p /var/tmp/mrtg-2.10.15-root/usr/share/man/man1
+ mkdir -p /var/tmp/mrtg-2.10.15-root/etc/httpd/conf.d
+ install -m 644 images/favicon.ico images/mrtg-l.gif images/mrtg-l.png images/mrtg-m.gif images/mrtg-m.png images/mrtg-r.gif images/mrtg-r.png images/mrtg-ti.gif images/mrtg-ti.png /var/tmp/mrtg-2.10.15-root/var/www/mrtg/
+ install -m 644 doc/cfgmaker.html doc/index.html doc/indexmaker.html doc/mrtg-contrib.html doc/mrtg-faq.html doc/mrtg-forum.html doc/mrtg-ipv6.html doc/mrtg-logfile.html doc/mrtg-mibhelp.html doc/mrtg-nt-guide.html doc/mrtg-reference.html doc/mrtg-rrd.html doc/mrtg-squid.html doc/mrtg-unix-guide.html doc/mrtg-webserver.html doc/mrtg.html doc/mrtglib.html /var/tmp/mrtg-2.10.15-root/var/www/mrtg/
+ sed 's,@CONTENTDIR@,/var/www/mrtg,g; s,@LIBDIR@,/var/lib/mrtg,g' /usr/src/redhat/SOURCES/mrtg.cfg
+ chmod 644 /var/tmp/mrtg-2.10.15-root/etc/mrtg/mrtg.cfg
+ sed -e 's,@bindir@,/usr/bin,g; s,@sysconfdir@,/etc,g;' -e s,@localstatedir@,/var,g /usr/src/redhat/SOURCES/mrtg.crond.in
+ chmod 644 /var/tmp/mrtg-2.10.15-root/etc/cron.d/mrtg
+ install -m 644 /usr/src/redhat/SOURCES/mrtg-httpd.conf /var/tmp/mrtg-2.10.15-root/etc/httpd/conf.d/mrtg.conf
+ install -m 644 /usr/src/redhat/SOURCES/README-14allcgi contrib/14all/README
+ install -m 755 /usr/src/redhat/SOURCES/14all.cgi contrib/14all
+ for i in bin/mrtg bin/rateup bin/cfgmaker bin/indexmaker
+ install -m 755 -c bin/mrtg /var/tmp/mrtg-2.10.15-root/usr/bin/
+ for i in bin/mrtg bin/rateup bin/cfgmaker bin/indexmaker
+ install -m 755 -c bin/rateup /var/tmp/mrtg-2.10.15-root/usr/bin/
+ for i in bin/mrtg bin/rateup bin/cfgmaker bin/indexmaker
+ install -m 755 -c bin/cfgmaker /var/tmp/mrtg-2.10.15-root/usr/bin/
+ for i in bin/mrtg bin/rateup bin/cfgmaker bin/indexmaker
+ install -m 755 -c bin/indexmaker /var/tmp/mrtg-2.10.15-root/usr/bin/
+ for i in mrtg cfgmaker indexmaker
+ /usr/bin/perl -pi -e 's;\@\@lib\@\@;lib;g' /var/tmp/mrtg-2.10.15-root/usr/bin/mrtg
+ for i in mrtg cfgmaker indexmaker
+ /usr/bin/perl -pi -e 's;\@\@lib\@\@;lib;g' /var/tmp/mrtg-2.10.15-root/usr/bin/cfgmaker
+ for i in mrtg cfgmaker indexmaker
+ /usr/bin/perl -pi -e 's;\@\@lib\@\@;lib;g' /var/tmp/mrtg-2.10.15-root/usr/bin/indexmaker
+ for i in 'lib/mrtg2/*.pm'
+ install -m 644 lib/mrtg2/BER.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/
+ for i in 'lib/mrtg2/*.pm'
+ install -m 644 lib/mrtg2/MRTG_lib.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/
+ for i in 'lib/mrtg2/*.pm'
+ install -m 644 lib/mrtg2/SNMP_Session.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/
+ for i in 'lib/mrtg2/*.pm'
+ install -m 644 lib/mrtg2/SNMP_util.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/
+ for i in 'lib/mrtg2/*.pm'
+ install -m 644 lib/mrtg2/locales_mrtg.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/
+ for i in 'lib/mrtg2/Pod/*.pm'
+ install -m 644 lib/mrtg2/Pod/InputObjects.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/Pod/
+ for i in 'lib/mrtg2/Pod/*.pm'
+ install -m 644 lib/mrtg2/Pod/Parser.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/Pod/
+ for i in 'lib/mrtg2/Pod/*.pm'
+ install -m 644 lib/mrtg2/Pod/PlainText.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/Pod/
+ for i in 'lib/mrtg2/Pod/*.pm'
+ install -m 644 lib/mrtg2/Pod/Select.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/Pod/
+ for i in 'lib/mrtg2/Pod/*.pm'
+ install -m 644 lib/mrtg2/Pod/Usage.pm /var/tmp/mrtg-2.10.15-root/usr/lib/mrtg2/Pod/
+ for i in 'doc/*.1'
+ install -m 644 doc/cfgmaker.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/indexmaker.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-contrib.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-faq.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-forum.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-ipv6.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-logfile.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-mibhelp.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-nt-guide.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-reference.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-rrd.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-squid.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-unix-guide.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg-webserver.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtg.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ for i in 'doc/*.1'
+ install -m 644 doc/mrtglib.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/
+ /usr/bin/perl -pi -e 's;\@\@lib\@\@;lib;g' /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/cfgmaker.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/indexmaker.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-contrib.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-faq.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-forum.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-ipv6.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-logfile.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-mibhelp.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-nt-guide.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-reference.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-rrd.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-squid.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-unix-guide.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg-webserver.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtg.1 /var/tmp/mrtg-2.10.15-root/usr/share/man/man1/mrtglib.1
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/mrtg-2.10.15
extracting debug info from /var/tmp/mrtg-2.10.15-root/usr/bin/rateup
107 blocks
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Processing files: mrtg-2.10.15-1
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.40081
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd mrtg-2.10.15
+ DOCDIR=/var/tmp/mrtg-2.10.15-root/usr/share/doc/mrtg-2.10.15
+ export DOCDIR
+ rm -rf /var/tmp/mrtg-2.10.15-root/usr/share/doc/mrtg-2.10.15
+ /bin/mkdir -p /var/tmp/mrtg-2.10.15-root/usr/share/doc/mrtg-2.10.15
+ cp -pr contrib ANNOUNCE CHANGES COPYING COPYRIGHT MANIFEST README THANKS /var/tmp/mrtg-2.10.15-root/usr/share/doc/mrtg-2.10.15
+ exit 0
Finding  Provides: /usr/lib/rpm/redhat/find-provides
objdump: /var/tmp/mrtg-2.10.15-root/usr/share/doc/mrtg-2.10.15/contrib/ovmrtg/ovtgts: File format not recognized
Finding  Requires: /usr/src/redhat/SOURCES/filter-requires-mrtg.sh
Provides: perl(BER) = 1.05 perl(GIFgraph) perl(GIFgraph::area) perl(GIFgraph::axestype) perl(GIFgraph::bars) perl(GIFgraph::colour) perl(GIFgraph::EvenlySpaced) = 1.0 perl(GIFgraph::legend) perl(GIFgraph::lines) perl(GIFgraph::linespoints) perl(GIFgraph::mixed) perl(GIFgraph::pie) perl(GIFgraph::points) perl(GIFgraph::utils) perl(GIFgraph::WithMap) = 1.0 perl(locales_mrtg) = 0.07 perl(MRTG_lib) = 2.100015 perl(ovmrtg) = 0.00 perl(Pod::InputObjects) = 1.13 perl(Pod::InputSource) perl(Pod::InteriorSequence) perl(Pod::Paragraph) perl(Pod::Parser) = 1.12 perl(Pod::ParseTree) perl(Pod::PlainText) perl(Pod::Select) = 1.13 perl(Pod::Usage) = 1.13 perl(SNMP_Session) = 1.05 perl(SNMP_util) = 1.04 perl(SNMPv1_Session) perl(SNMPv2c_Session)
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(VersionedDependencies) <= 3.0.3-1
Requires(post): /bin/sh
Requires(postun): /bin/sh
Requires: perl >= 0:5.004 gd /bin/sh /bin/bash /bin/sh /usr/bin/perl /usr/local/bin/perl libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.3) libgd.so.2 libm.so.6 libm.so.6(GLIBC_2.0) libpng12.so.0 libz.so.1 perl >= 0:5.002 perl >= 0:5.003 perl >= 0:5.004 perl >= 0:5.005 perl(BER) perl(Carp) perl(CGI) perl(CGI::Carp) perl(Config) perl(Exporter) perl(File::Basename) perl(File::Copy) perl(File::Spec) perl(FindBin) perl(find.pl) perl(Getopt::Long) perl(Getopt::Std) perl(GIFgraph) perl(GIFgraph::area) perl(GIFgraph::axestype) perl(GIFgraph::bars) perl(GIFgraph::colour) perl(GIFgraph::legend) perl(GIFgraph::lines) perl(GIFgraph::linespoints) perl(GIFgraph::points) perl(GIFgraph::utils) perl(IO::Socket) perl(lib) perl(locales_mrtg) perl(Math::BigFloat) perl(MRTG_lib) perl(Pod::InputObjects) perl(Pod::Parser) >= 1.04 perl(Pod::Select) perl(Pod::Usage) perl(POSIX) perl(SNMP_Session) perl(SNMP_util) perl(Socket) perl(stat.pl) perl(strict) perl(URI) perl(vars)
Processing files: mrtg-debuginfo-2.10.15-1
Finding  Provides: /usr/lib/rpm/redhat/find-provides
Finding  Requires: /usr/src/redhat/SOURCES/filter-requires-mrtg.sh
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/mrtg-2.10.15-root
warning: Could not canonicalize hostname: isd.logicacmg.com
Wrote: /usr/src/redhat/RPMS/i386/mrtg-2.10.15-1.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/mrtg-debuginfo-2.10.15-1.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.56782
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd mrtg-2.10.15
+ rm -rf /var/tmp/mrtg-2.10.15-root
+ exit 0

Code:

[root@isd SPECS]# cd ../RPMS/i386
You have new mail in /var/spool/mail/root
[root@isd i386]# rpm -Uvh xxxxx.i386.rpm
error: open of xxxxx.i386.rpm failed: No such file or directory
[root@isd i386]# rpm -Uvh mrtg-
mrtg-2.10.15-1.i386.rpm            mrtg-debuginfo-2.10.15-1.i386.rpm
[root@isd i386]# rpm -Uvh mrtg-2.10.15-1.i386.rpm
error: Failed dependencies:
        /usr/local/bin/perl is needed by mrtg-2.10.15-1.i386
[root@isd i386]# rpm -ivh mrtg-2.10.15-1.i386.rpm
error: Failed dependencies:
        /usr/local/bin/perl is needed by mrtg-2.10.15-1.i386
[root@isd i386]# perl -v

This is perl, v5.8.5 built for i386-linux-thread-multi

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

Code:

[root@isd i386]# whereis perl
perl: /usr/bin/perl /usr/local/bin/perl /usr/share/man/man1/perl.1.gz
You have new mail in /var/spool/mail/root
[root@isd i386]#


chrism01 06-02-2008 07:41 PM

You should try to use the pkg mgr instead of doing it by hand.

In this particular case, mrtg expects perl to be

/usr/local/bin/perl

your default is

/usr/bin/perl

You could change your path as it looks like you've a got another copy (or symlink ?) at /usr/local/bin/perl.
I hop its a symlink, as having 2 perl installs is not usually a good thing, unless you've done it deliberately.

ajeetraina 06-04-2008 05:58 AM

As replied by
Code:

megerdin
Do we really need the last
Code:

#rpm -Uvh xxxxx.i386.rpm
When I ran rpmbuild -bb xxxx.spec it had already created .rpm file under i386.

Pls Specify.
Also When I tried running the rpm -Uvh it says : it is already there
Code:

[root@isd i386]# rpm -Uvh net-snmp-5.1.2-11.EL4.7.i386.rpm
Preparing...                ########################################### [100%]
        package net-snmp-5.1.2-11.EL4.7 is already installed
        file /usr/sbin/snmpd from install of net-snmp-5.1.2-11.EL4.7 conflicts with file from package net-snmp-5.1.2-11.EL4.7
        file /usr/sbin/snmptrapd from install of net-snmp-5.1.2-11.EL4.7 conflicts with file from package net-snmp-5.1.2-11.EL4.7
[root@isd i386]#

.

megerdin 06-07-2008 04:30 AM

Somehow this package buildup and also Installed before.

So you don't need to rebuild the package and install.


Thanks


All times are GMT -5. The time now is 05:55 PM.