Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7683913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:54:18+00:00 2026-05-31T18:54:18+00:00

I downloaded and installed the latest libssh2 from their website into the location /usr/src/libssh2-1.4.0

  • 0

I downloaded and installed the latest libssh2 from their website into the location /usr/src/libssh2-1.4.0

I was trying to build one of the example programs (ssh2.c) that is available in the example directory. When I compiled with make from /usr/src/libssh2-1.4.0/example as

make ssh2

, it compiled and ran quite fine. I then copied the program ssh2.c to a different path (~/Projects/precious/) and issued the command

gcc -g -I/usr/src/libssh2-1.4.0/src -I/usr/src/libssh2-1.4.0/include -I/usr/src/libssh2-1.4.0/src/obj ssh.c -o ssh -lssh2 -ldl -lnsl -lresolv -lcrypto -lssl -lz 

When I am trying to run the program, it greets me with the following message

./ssh: symbol lookup error: ./ssh: undefined symbol: libssh2_session_handshake

I also tried to compile it simply as

g++ -g ssh.c -o ssh -lssh2

The response is all the same.

I also tried compiling as

gcc -DHAVE_CONFIG_H      -g -O2  -I/usr/src/libssh2-1.4.0/src -I/usr/src/libssh2-1.4.0/include -I/usr/src/libssh2-1.4.0/src/obj -c -o ssh.o ssh.c 
libtool --tag=CC --mode=link gcc  -g -O2   -o ssh  ssh.o /usr/local/lib/libssh2.la

but without any luck. Please suggest

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:54:19+00:00Added an answer on May 31, 2026 at 6:54 pm

    I suspect that your libssh2 package that you’ve built by hand is a different version (probably newer) than the one installed on your system. And your link line is trying to use the one installed on the system, which doesn’t have the libssh2_session_handshake function in it. Try this line:

    gcc -g -L/usr/local/lib -I/usr/src/libssh2-1.4.0/src -I/usr/src/libssh2-1.4.0/include -I/usr/src/libssh2-1.4.0/src/obj ssh.c -o ssh -lssh2 -ldl -lnsl -lresolv -lcrypto -lssl -lz 
    

    or maybe this one:

    gcc -g -L/usr/src/libssh2-1.4.0/src/obj -I/usr/src/libssh2-1.4.0/src -I/usr/src/libssh2-1.4.0/include -I/usr/src/libssh2-1.4.0/src/obj ssh.c -o ssh -lssh2 -ldl -lnsl -lresolv -lcrypto -lssl -lz 
    

    The important thing is to get the -L flag pointing to the path where your compiled library is located.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I downloaded and installed XAMPP for linux latest Development package from XAMPP website. Now
I downloaded the latest video capture samples from WWDC 2010 and am trying to
I downloaded the latest open source version of QT4-and its installed in c:\qt\2009.04. I've
I had downloaded and installed the 1.6.9 version of SVN from http://subversion.tigris.org/ . After
I would like to remove/uninstall directX End-User that I downloaded and installed it from
I downloaded the latest version of eclipse (3.5.SR2) and get m2eclipse installed on. Instead
I've downloaded latest source from mono project, compiled it and everything works (c# projects,
Computer: Windows 7 x64 bit, Visual Studio 2008 Downloaded the latest OpenCV build (2.3.3)
I'm trying to install the latest v5.0.0 beta 2 BlackBerry OS Component Pack into
What am I doing wrong ? I just downloaded the latest Rx sdk, installed.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.