LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-17-2003, 07:46 AM   #1
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Rep: Reputation: 30
RPM vs Source


How do I know if my installation is using the rpm or source code files? I upgraded my ssh using source code, which you manually compile the code (make, make install). I notice one change, the configuration file is now located in /usr/local/etc & sbin & etc. The original ssh is rpm located /etc/ssh.

My question; Is my ssh using the new version or still using the old rpm version? How do I verify?

openssh-3.7p1-- source code
openssh-3.1p1-13 --- rpm
 
Old 12-17-2003, 08:04 AM   #2
dingding66
Member
 
Registered: Jan 2003
Location: Utah, USA
Distribution: Mandrake 9.2
Posts: 51

Rep: Reputation: 15
If you just used the default ./configure without passing --prefix=/usr to it then it defaulted to install in /usr/local instead of /usr. If /usr/local/bin is not in your PATH$ then you're most likely still calling the old version. Try starting it from the command line with --version after it. Most programs recognize this and will output the version and exit. Hope that helps.
 
Old 12-17-2003, 08:25 AM   #3
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
How do you know where should you place the ssh files /usr/ or default? Yes /usr/local/bin is already in my PATH. Where do I type the command --version? What is the whole command?
 
Old 12-17-2003, 08:55 AM   #4
dingding66
Member
 
Registered: Jan 2003
Location: Utah, USA
Distribution: Mandrake 9.2
Posts: 51

Rep: Reputation: 15
I was just looking at mine and I guess it doesn't recognize --version (grumble grumble) so that way won't work. if you rpm -e openssh (in a terminal, as root) it will remove the rpm of the old version, leaving you with the newer version which you installed from source. Since /usr/local is in your PATH$ then it will be found/used.

Generally, if you're upgrading something that was originally an rpm and now you're building it from source the best way to do it is to remove the rpm package first.

Something you may want to look into if you're going to build from source is a program called 'checkinstall.' http://asic-linux.com.mx/~izto/checkinstall/ it will create an .rpm (or a .deb or a .tgz) which can be installed/uninstalled (it's explained on their site) from the source code. Since I've found it I use it all the time. Quite a handy little tool.

As to whether you should put the ssh in /usr or /usr/local, as long as it's in your PATH$ and the lib directory (/usr/local/lib) is in /etc/ld.so.conf you're fine just using /usr/local. (if /usr/local/lib is not in /etc/ld.so.conf, add it (open it in a text editor as root), save it, then run (as root) ldconfig.)
 
Old 12-17-2003, 09:28 AM   #5
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
Build source to rpm....I'll check it out.
 
Old 12-17-2003, 09:45 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Apart from that, the OpenSSH tarball does contain a spec file, which means you could do "rpm -tb openssh-3.71p2.tar.gz" and generate the binary rpm.
Use "-ta" to generate .rpm's and .src.rpm's.
 
Old 12-18-2003, 02:46 AM   #7
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
Unspawn...i try both command, I get an error message.

[root@mrtg2 /tmp]# rpm -ta openssh-3.7.1p2.tar.gz
error: File /tmp/x11-ssh-askpass-1.2.4.1.tar.gz: No such file or directory
 
Old 12-18-2003, 07:17 AM   #8
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
dingding.....I downloaded the binary in RPM. I notice checkinstall file created on /usr/doc. I'm a little puzzle with the README instructions. Do we created a running scripts??

[root@mrtg2 tmp]# checkinstall -R openssl-0.9.6l.tar.gz

checkinstall 1.5.3, Copyright 2001 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.


The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y

Preparing package documentation...OK

*** No known documentation files were found. The new package
*** won't include a documentation directory.

Installing with "openssl-0.9.6l.tar.gz"...

========================= Installation results ===========================
/var/tmp/phVVqRRHhZQTkCAdNPRD/installscript.sh: openssl-0.9.6l.tar.gz: command not found

**** Installation failed. Aborting package creation.

Cleaning up...OK

Bye.
 
Old 12-18-2003, 11:11 AM   #9
dingding66
Member
 
Registered: Jan 2003
Location: Utah, USA
Distribution: Mandrake 9.2
Posts: 51

Rep: Reputation: 15
To use the checkinstall:

tar zxvf openssl-0.9.6l.tar.gz
cd openssl-0.9.6l
./configure --prefix=/usr
make
su
(root password)
checkinstall

then it will ask a few things... it needs a description (you can just say openssl and hit enter twice or if you want to be more descriptive you can), you'll want to choose "R" for an RPM package. It will then give you a summary and you just hit Enter to continue.
 
Old 12-18-2003, 01:22 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Its a separate tarball, see http://www.jmknoble.net/software/x11-ssh-askpass/.
 
Old 12-19-2003, 06:07 AM   #11
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
dingding...checkinstall works real good but I run into a problem, missing a file when I restart my sshd.

What do you guys think what happen to the file?

[root@mrtg2 sbin]# ./sshd start

./sshd: error while loading shared libraries: libcrypto.so.1: cannot open shared object file: No such file or directory
 
Old 12-19-2003, 06:41 AM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Try to find out:
Binary linkage: running "ldd /usr/sbin/sshd |grep crypt" should show "libcrypt.so.1 => /lib/libcrypt.so.1". Linker cache: running "ldconfig -p|grep crypt" should show "libcrypt.so.1 => /lib/libcrypt.so.1". Stat or "file /lib/libcrypt.so.1" should show "/lib/libcrypt.so.1: symbolic link to libcrypt-(version).so"

If running "file" doesn't show the file, then you need to install it (part of Glibc AFAIK). If "ldconfig" doesnt show it but you have the file, then you need to run "ldconfig" to update the linker cache.
 
Old 12-19-2003, 07:05 AM   #13
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
OK...My ssh was working before until I upgraded to a new version...where can I find the Glibc AFAIK?


[danny@mrtg2 danny]# ldconfig -p|grep crypt
libk5crypto.so.3 (libc6) => /usr/kerberos/lib/libk5crypto.so.3
libcrypto.so.0 (libc6) => /usr/lib/libcrypto.so.0
libcrypt.so.1 (libc6, OS ABI: Linux 2.2.5) => /lib/libcrypt.so.1
libcrypt.so (libc6, OS ABI: Linux 2.2.5) => /usr/lib/libcrypt.so

[danny@mrtg2 danny]# ldd /usr/sbin/sshd |grep crypt
libcrypto.so.1 => not found
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40050000)

[danny@mrtg2 danny]# ldconfig
[danny@mrtg2 danny]# /etc/init.d/sshd restart
Stopping sshd:[FAILED]
Starting sshd:/usr/sbin/sshd: error while loading shared libraries: libcrypto.so.1: cannot open shared object file: No such file or directory
[FAILED]
[danny@mrtg2 danny]#
 
Old 12-19-2003, 09:10 AM   #14
dingding66
Member
 
Registered: Jan 2003
Location: Utah, USA
Distribution: Mandrake 9.2
Posts: 51

Rep: Reputation: 15
Which distribution are you using?

First, run updatedb as root then do
locate lybcrypto.so.1
It should have been installed as part of openssl. If it is found, make note of the location then:
1) as root, edit /etc/ld.so.conf
2) add the path to the directory containing lybcrypto.so.1
(for example, if locate tells you it's in /usr/local/lib/libcrypto.so.1 you would add /usr/local/lib)
3) save and exit
4) as root, run ldconfig

Last edited by dingding66; 12-19-2003 at 09:17 AM.
 
Old 12-19-2003, 12:35 PM   #15
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
I download openssh & openssl from openssh.org & openssl.org site. I follow your checkinstall instruction and select R.

I try your steps to locate the file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot build source rpm/ rpm questions kpachopoulos Fedora 3 07-24-2005 09:15 AM
how do I make a binary rpm from a source rpm darkone66669 Linux - Software 3 01-11-2005 10:42 AM
where does it go when rpm a rpm source file feetyouwell Linux - Software 1 09-03-2004 04:14 PM
Difference between src.rpm files and source.rpm files ja_nch Red Hat 2 09-06-2003 06:12 PM
binary vs source RPM (and other RPM questions) calimer Linux - Software 4 06-22-2003 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration