1833439 Members
3620 Online
110052 Solutions
New Discussion

Compiling SSH

 
SOLVED
Go to solution
Nickolas A Gray
Advisor

Compiling SSH

I am trying to run a compile and can't seem to find a source for GCC and what the options mean

I get the following error

/usr/bin/ld: Can't find library for -lz
collect2: ld returned 1 exit status
4 REPLIES 4
Curtis Larson
Trusted Contributor
Solution

Re: Compiling SSH

without knowing much about what your trying to do, which version of ssh, compiler, etc. I'd say you haven't defined a path to the zlib compression library, ie a -L /directory_where/libz.[a,sl] resides for your loader (ld). you need a LDFLAGS="-L path" someplace.
CHRIS_ANORUO
Honored Contributor

Re: Compiling SSH

Do a search with "SSH" as your search word in this community.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Nickolas A Gray
Advisor

Re: Compiling SSH

Thanks, That error went away now it is coming up with

"Makefile" 198 lines, 7607 characters
# make
gcc -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o log-client.o readconf.o clientloop.o -L. -L/usr/local/ssl/lib -L/usr/local/ssl -L/opt/zlib/lib -lssh -lopenbsd-compat -lnsl -lz -lpam -lcrypto -lRSAglue -lrsaref
/usr/bin/ld: Can't find library for -lRSAglue
collect2: ld returned 1 exit status
*** Error exit code 1
Curtis Larson
Trusted Contributor

Re: Compiling SSH

those libraries should have been made when you compiled ssl. did you configure ssl for rsa support. you could check the directory where you made ssl for these libraries. But you have the same problem as with zlib, the loader doesn't know with it is. You need to find it and add a -L option or move the library to where one of your -L's already references.