Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

OpenSSL headers do not match your library [Solved]

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
helio
Apprentice
Apprentice
Posts: 252
Joined: Sat Apr 08, 2006 11:16 pm

OpenSSL headers do not match your library [Solved]

  • Quote

Post by helio » Fri Sep 05, 2025 12:42 pm

For some reason, during emerge net-misc/openssh I am getting the following error message

Code: Select all

checking OpenSSL header version... 30000100 (OpenSSL 3.0.16 11 Feb 2025)
checking for OpenSSL_version... yes
checking for OpenSSL_version_num... yes
checking OpenSSL library version... 30400020 (OpenSSL 3.4.2 1 Jul 2025)
checking whether OpenSSL's headers match the library... no
Configure: error: Your OpenSSL headers do not match your library.
which fails the emerge. Any suggestions on fixing this problem are appreciated.

[Administrator edit: added [code] tags to preserve output layout. -Hu]
Last edited by helio on Sun Sep 07, 2025 12:44 pm, edited 1 time in total.
Top
grknight
Retired Dev
Retired Dev
Posts: 2554
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Fri Sep 05, 2025 12:49 pm

Ensure that there are no OpenSSL headers in /usr/local which is a common error point.

Edit: In short, the command find /usr -name opensslv.h should only return one result.
Top
helio
Apprentice
Apprentice
Posts: 252
Joined: Sat Apr 08, 2006 11:16 pm

  • Quote

Post by helio » Fri Sep 05, 2025 2:29 pm

grknight wrote:Ensure that there are no OpenSSL headers in /usr/local which is a common error point.

Edit: In short, the command find /usr -name opensslv.h should only return one result.
Thanks. Here are opensslv.h locations under /usr

/usr/include/opensslv.h
/usr/include/openssl/opensslv.h
/usr/local/ssl/include/opensslv.h
/usr/local/ssl/openssl-3.0.16/include/openssl/opensslv.h

But shouldn't the emerge operation automatically update/upgrade the header file to the new version to be emerged/installed?
Top
grknight
Retired Dev
Retired Dev
Posts: 2554
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Fri Sep 05, 2025 3:23 pm

helio wrote:Thanks. Here are opensslv.h locations under /usr

/usr/include/opensslv.h
/usr/include/openssl/opensslv.h
/usr/local/ssl/include/opensslv.h
/usr/local/ssl/openssl-3.0.16/include/openssl/opensslv.h

But shouldn't the emerge operation automatically update/upgrade the header file to the new version to be emerged/installed?
Only /usr/include/openssl/opensslv.h is likely valid. Emerge will only update what it has control over, not the entire system.

The headers in /usr/local/ssl will cause problems with programs building for OpenSSL but using the system library since the versions are different.
You should remove any /usr/local/ssl/ files to prevent issues.
Top
helio
Apprentice
Apprentice
Posts: 252
Joined: Sat Apr 08, 2006 11:16 pm

  • Quote

Post by helio » Sun Sep 07, 2025 3:06 am

Thanks. Yes, indeed the versions of openssl, both header and binary files under /usr and /usr/local are different. I don't understand how or why this happened, i.e. why does emerge install openssl library under /usr but try to look for openssl under /usr/local when emerging openssh. Seems a lot hassles to manually maintain the consistency. Is there any way to automatically keep them same or consistent? Look forward to your insights.
Top
hdcg
Tux's lil' helper
Tux's lil' helper
Posts: 122
Joined: Sun Apr 07, 2013 8:30 am

  • Quote

Post by hdcg » Sun Sep 07, 2025 5:34 am

The /usr/local/openssl files are quite sure not installed by emerge. Try

Code: Select all

equery b /usr/local/include/openssl/opensslv.h
to check.
Did you install some software manually?
Top
helio
Apprentice
Apprentice
Posts: 252
Joined: Sat Apr 08, 2006 11:16 pm

  • Quote

Post by helio » Sun Sep 07, 2025 12:42 pm

Thanks. Still not sure how the local version of openssl was installed. Now that it is quite sure not installed by emerge, I linked the local version to the /usr version, and the emerge openssh has been able to proceed. Thanks all again.
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Sun Sep 07, 2025 5:28 pm

I would remove the /usr/local version(s) - especially if you don't know how they ended up there - nothing in Gentoo is supposed to place them there.
Top
helio
Apprentice
Apprentice
Posts: 252
Joined: Sat Apr 08, 2006 11:16 pm

  • Quote

Post by helio » Mon Sep 08, 2025 12:27 am

freke wrote:I would remove the /usr/local version(s) - especially if you don't know how they ended up there - nothing in Gentoo is supposed to place them there.
Good suggestion. Removed the links. Thanks.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy