Thread: Installed OpenSSL but still cannot install PostgreSQL

Installed OpenSSL but still cannot install PostgreSQL

From
"Tamir Halperin"
Date:
I have installed openssl-0.9.7a_2 from the ports collection without a glitch. I'm new to this and don't know if simply
doingmake, make install and make clean is all that is required for getting openssl properly installed. It shows up
listedin /var/db/pkg in my FreeBSD 4.6 system. However, when I try to make postgresql7 from the ports collection I'm
told:

This port requires the OpenSSL library, which is part of the FreeBSD crypto distribution but not installed on your
machine.

Not sure what to do next.

Tamir


Re: Installed OpenSSL but still cannot install PostgreSQL

From
Sean Chittenden
Date:
> I have installed openssl-0.9.7a_2 from the ports collection without
> a glitch. I'm new to this and don't know if simply doing make, make
> install and make clean is all that is required for getting openssl
> properly installed. It shows up listed in /var/db/pkg in my FreeBSD
> 4.6 system. However, when I try to make postgresql7 from the ports
> collection I'm told:
>
> This port requires the OpenSSL library, which is part of the FreeBSD
> crypto distribution but not installed on your machine.
>
> Not sure what to do next.

This is because libcrypto had its shlib version bumped from .2 to .3
after OpenSSL's last round of security bugs.  If you symlink
libcrypto.so.2 to libcrypto.so, you should be okay.  -sc

--
Sean Chittenden


Re: Installed OpenSSL but still cannot install PostgreSQL

From
"Tamir Halperin"
Date:
> This is because libcrypto had its shlib version bumped from .2 to .3
> after OpenSSL's last round of security bugs.  If you symlink
> libcrypto.so.2 to libcrypto.so, you should be okay.  -sc

Done that and I'm still unable to move past the message below. If anyone has an idea why I'm still being asked to
installOpenSSL when I did I would be greatly aided. 

> -----Original Message-----
> From: Tamir Halperin
> Sent: Monday, March 24, 2003 4:43 AM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] Installed OpenSSL but still cannot install PostgreSQL
>
>
> I have installed openssl-0.9.7a_2 from the ports collection
> without a glitch. I'm new to this and don't know if simply
> doing make, make install and make clean is all that is
> required for getting openssl properly installed. It shows up
> listed in /var/db/pkg in my FreeBSD 4.6 system. However, when
> I try to make postgresql7 from the ports collection I'm told:
>
> This port requires the OpenSSL library, which is part of the
> FreeBSD crypto distribution but not installed on your machine.
>
> Not sure what to do next.
>
> Tamir
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


Re: Installed OpenSSL but still cannot install PostgreSQL

From
"Tamir Halperin"
Date:
    1:-lcrypt.2 => /usr/lib/libcrypt.so.2
    110:-lcrypto.2 => /usr/local/lib/libcrypto.so.2
    111:-lcrypto.3 => /usr/local/lib/libcrypto.so.3
    117:-lmcrypt.8 => /usr/local/lib/libmcrypt.so.8

> -----Original Message-----
> From: Dmitry Morozovsky [mailto:marck@rinet.ru]
> Sent: Monday, March 24, 2003 6:38 AM
> To: Tamir Halperin
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Installed OpenSSL but still cannot install
> PostgreSQL
>
>
> On Mon, 24 Mar 2003, Tamir Halperin wrote:
>
> TH> > This is because libcrypto had its shlib version bumped
> from .2 to .3
> TH> > after OpenSSL's last round of security bugs.  If you symlink
> TH> > libcrypto.so.2 to libcrypto.so, you should be okay.  -sc
> TH>
> TH> Done that and I'm still unable to move past the message
> below. If anyone
> TH> has an idea why I'm still being asked to install OpenSSL
> when I did I would
> TH> be greatly aided.
>
> what is the output of 'ldconfig -r | grep crypt' ?
>
>
> Sincerely,
> D.Marck                                   [DM5020,
> DM268-RIPE, DM3-RIPN]
> --------------------------------------------------------------
> ----------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle ---
> marck@rinet.ru ***
> --------------------------------------------------------------
> ----------
>


Re: Installed OpenSSL but still cannot install PostgreSQL

From
Dmitry Morozovsky
Date:
On Mon, 24 Mar 2003, Tamir Halperin wrote:

TH>     1:-lcrypt.2 => /usr/lib/libcrypt.so.2
TH>     110:-lcrypto.2 => /usr/local/lib/libcrypto.so.2
TH>     111:-lcrypto.3 => /usr/local/lib/libcrypto.so.3
TH>     117:-lmcrypt.8 => /usr/local/lib/libmcrypt.so.8

Aha. This seems to be a fault in /usr/ports/Mk/bsd.port.mk around line 930

.if defined(USE_OPENSSL)
.if ${OSVERSION} >= 400014
.if !exists(/usr/lib/libcrypto.so)
.BEGIN:
        @${ECHO_CMD} "This port requires the OpenSSL library, which is part of"
        @${ECHO_CMD} "the FreeBSD crypto distribution but not installed on your"

You may try to play with symlinks, but I suppose more natural way is to upgrade
your system to at least 4.6 security branch and install OpenSSL from base
system.

Or, you can simply make postgresql port without SSL support:

cd /usr/ports/databases/postgresql7
make WITHOUT_SSL=yes



Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------


Re: Installed OpenSSL but still cannot install PostgreSQL

From
Dmitry Morozovsky
Date:
On Mon, 24 Mar 2003, Dmitry Morozovsky wrote:

DM> TH>     1:-lcrypt.2 => /usr/lib/libcrypt.so.2
DM> TH>     110:-lcrypto.2 => /usr/local/lib/libcrypto.so.2
DM> TH>     111:-lcrypto.3 => /usr/local/lib/libcrypto.so.3
DM> TH>     117:-lmcrypt.8 => /usr/local/lib/libmcrypt.so.8
DM>
DM> Aha. This seems to be a fault in /usr/ports/Mk/bsd.port.mk around line 930
DM>
DM> .if defined(USE_OPENSSL)
DM> .if ${OSVERSION} >= 400014
DM> .if !exists(/usr/lib/libcrypto.so)
DM> .BEGIN:
DM>         @${ECHO_CMD} "This port requires the OpenSSL library, which is part of"
DM>         @${ECHO_CMD} "the FreeBSD crypto distribution but not installed on your"
DM>
DM> You may try to play with symlinks, but I suppose more natural way is to upgrade
DM> your system to at least 4.6 security branch and install OpenSSL from base
DM> system.

The last note: you can also re-install openssl port (pkg_delete previous
installation first) within base:

cd /usr/ports/security/openssl
make OPENSSL_OVERWRITE_BASE=yes
make install


Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------


Re: Installed OpenSSL but still cannot install PostgreSQL

From
Dmitry Morozovsky
Date:
On Mon, 24 Mar 2003, Tamir Halperin wrote:

TH> > This is because libcrypto had its shlib version bumped from .2 to .3
TH> > after OpenSSL's last round of security bugs.  If you symlink
TH> > libcrypto.so.2 to libcrypto.so, you should be okay.  -sc
TH>
TH> Done that and I'm still unable to move past the message below. If anyone
TH> has an idea why I'm still being asked to install OpenSSL when I did I would
TH> be greatly aided.

what is the output of 'ldconfig -r | grep crypt' ?


Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------


Re: Installed OpenSSL but still cannot install PostgreSQL

From
"Tamir Halperin"
Date:
After following your instructions regarding the deinstallation of the openssl package and then reinstalling it with
makeOPENSSL_OVERWRITE_BASE=yes, I still get the same message when executing make in the
/usr/ports/databases/postgresql7directory that tells me I need to first install openssl. 

Here's the output of ldconfig -r | grep crypt:

    1:-lcrypt.2 => /usr/lib/libcrypt.so.2
    110:-lcrypto.2 => /usr/local/lib/libcrypto.so.2
    111:-lcrypto.3 => /usr/local/lib/libcrypto.so.3
    117:-lmcrypt.8 => /usr/local/lib/libmcrypt.so.8

I'm sure there's a solution to using postgresql 7.3.2 with openssl. I just don't have it.

> -----Original Message-----
> From: Dmitry Morozovsky [mailto:marck@rinet.ru]
> Sent: Monday, March 24, 2003 6:38 AM
> To: Tamir Halperin
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Installed OpenSSL but still cannot install
> PostgreSQL
>
>
> On Mon, 24 Mar 2003, Tamir Halperin wrote:
>
> TH> > This is because libcrypto had its shlib version bumped
> from .2 to .3
> TH> > after OpenSSL's last round of security bugs.  If you symlink
> TH> > libcrypto.so.2 to libcrypto.so, you should be okay.  -sc
> TH>
> TH> Done that and I'm still unable to move past the message
> below. If anyone
> TH> has an idea why I'm still being asked to install OpenSSL
> when I did I would
> TH> be greatly aided.
>
> what is the output of 'ldconfig -r | grep crypt' ?
>
>
> Sincerely,
> D.Marck                                   [DM5020,
> DM268-RIPE, DM3-RIPN]
> --------------------------------------------------------------
> ----------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle ---
> marck@rinet.ru ***
> --------------------------------------------------------------
> ----------
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>


Re: Installed OpenSSL but still cannot install PostgreSQL

From
Dmitry Morozovsky
Date:
On Mon, 24 Mar 2003, Tamir Halperin wrote:

TH> After following your instructions regarding the deinstallation of the
TH> openssl package and then reinstalling it with make
TH> OPENSSL_OVERWRITE_BASE=yes, I still get the same message when executing
TH> make in the /usr/ports/databases/postgresql7 directory that tells me I need
TH> to first install openssl.
TH>
TH> Here's the output of ldconfig -r | grep crypt:
TH>
TH>     1:-lcrypt.2 => /usr/lib/libcrypt.so.2
TH>     110:-lcrypto.2 => /usr/local/lib/libcrypto.so.2
TH>     111:-lcrypto.3 => /usr/local/lib/libcrypto.so.3
TH>     117:-lmcrypt.8 => /usr/local/lib/libmcrypt.so.8
TH>
TH> I'm sure there's a solution to using postgresql 7.3.2 with openssl. I just don't have it.

Well, thanks for re-checking with ldconfig we can see our
OPENSSL_OVERWRITE_BASE did not help. Something is broken during the upgrade.
Can you check whether openssl libraries reside only in /usr/local/lib and not
in /usr/lib ?

BTW, you can look at /var/bd/pkg/<pkgname-version>/+CONTENTS to see where are
the files installed by port reside. also, `pkg_info -W /path/to/the/file' is
useful to debug.

About your problem: contemporary port building system checks for OpenSSL _only_
in base system directories, particularly /usr/lib/libcrypto.so

So, possibly, quick hack like 'ln -s /usr/local/lib/libcrypto.so /usr/lib' may
help you.

Anyway, please consider upgrading to 4.8 which should be out of door this week.


Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------


Re: Installed OpenSSL but still cannot install PostgreSQL

From
"Tamir Halperin"
Date:

> -----Original Message-----
> From: Dmitry Morozovsky [mailto:marck@rinet.ru]
> Sent: Monday, March 24, 2003 7:20 PM
> To: Tamir Halperin
> Cc: pgsql-admin@postgresql.org
> Subject: RE: [ADMIN] Installed OpenSSL but still cannot install
> PostgreSQL
>
>
> On Mon, 24 Mar 2003, Tamir Halperin wrote:
>
> TH> After following your instructions regarding the
> deinstallation of the
> TH> openssl package and then reinstalling it with make
> TH> OPENSSL_OVERWRITE_BASE=yes, I still get the same message
> when executing
> TH> make in the /usr/ports/databases/postgresql7 directory
> that tells me I need
> TH> to first install openssl.
> TH>
> TH> Here's the output of ldconfig -r | grep crypt:
> TH>
> TH>     1:-lcrypt.2 => /usr/lib/libcrypt.so.2
> TH>     110:-lcrypto.2 => /usr/local/lib/libcrypto.so.2
> TH>     111:-lcrypto.3 => /usr/local/lib/libcrypto.so.3
> TH>     117:-lmcrypt.8 => /usr/local/lib/libmcrypt.so.8
> TH>
> TH> I'm sure there's a solution to using postgresql 7.3.2
> with openssl. I just don't have it.
>
> Well, thanks for re-checking with ldconfig we can see our
> OPENSSL_OVERWRITE_BASE did not help. Something is broken
> during the upgrade.
> Can you check whether openssl libraries reside only in
> /usr/local/lib and not
> in /usr/lib ?
>
> BTW, you can look at /var/bd/pkg/<pkgname-version>/+CONTENTS
> to see where are
> the files installed by port reside. also, `pkg_info -W
> /path/to/the/file' is
> useful to debug.
>
> About your problem: contemporary port building system checks
> for OpenSSL _only_
> in base system directories, particularly /usr/lib/libcrypto.so
>
> So, possibly, quick hack like 'ln -s
> /usr/local/lib/libcrypto.so /usr/lib' may
> help you.

I can't believe it. After two days of scraping around for why it isn't working and one command later it works!

It's amazing what knowledge will do for a person's outlook on life.

The above ln command worked and postgresql 7.3.2 is currently installing.

> Anyway, please consider upgrading to 4.8 which should be out
> of door this week.

This is not the mail list for such a question but since you bring it up, can you point me to a concise documented
procedurefor upgrading my 4.6 to 4.7 or 4.8? 

If you prefer, you can post it to freebsd-questions where I will eagerly await your response. Thanks again and again.

Tamir

>
> Sincerely,
> D.Marck                                   [DM5020,
> DM268-RIPE, DM3-RIPN]
> --------------------------------------------------------------
> ----------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle ---
> marck@rinet.ru ***
> --------------------------------------------------------------
> ----------
>