Link to home
Start Free TrialLog in
Avatar of Member_2_3700103
Member_2_3700103

asked on

postfix start error!

I attempted to start postfix using the following command.
# /var/home/ap/postfix/bin/postfix start

At that time, the following error was output.
/var/home/ap/postfix/bin/postconf: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
/var/home/ap/postfix/bin/postlog: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

The environment variable "LD_LIBRARY_PATH" is as follows.
LD_LIBRARY_PATH=/var/home/lib/openssl/lib

Did not use LD_LIBRARY_PATH from Postfix 3.2.0?
Please help someone.
Avatar of Scott Silva
Scott Silva
Flag of United States of America image

Do you have that library installed? If not install it. If it is installed, make sure you have at least a symlink to the expected library location...
Avatar of Member_2_3700103
Member_2_3700103

ASKER

Hi!Scott!

Thanks for your comment.
Of course the library is installed.
If possible, I do not want to use symlink ... Does not there any other means ...
Since you define LD_LIBRARY_PATH MAKE SURE to include /usr/lib:/usr/local/lib
Not sure why you are running postfix out of /var/ap/home versus the normal /usr/sbin ..

What Linux distribution are you running, are you using some kind of prepared package ......?
Hi!arnold!
Thanks for your comment.

>Since you define LD_LIBRARY_PATH MAKE SURE to include /usr/lib:/usr/local/lib
I set it to LD_LIBRARY_PATH, but the result does not change.
Also, setting the path to OpenSSL in ld.so.conf.d will work.

>Not sure why you are running postfix out of /var/ap/home versus the normal /usr/sbin ..
Due to security concerns, I have installed OpenSSL and installed it in a different location than usual.
The place where OpenSSL is installed is "var / home / lib / openssl".

Also, in Postfix build, I compile using the following command, is this correct?
make -f Makefile.init makefiles \
        shared=yes \
        dynamicmaps=yes \
        command_directory=/var/home/ap/postfix/bin \
        config_directory=/var/home/ap/postfix/etc \
        daemon_directory=/var/home/ap/postfix/libexec \
        data_directory=/var/home/ap/postfix/data \
        mailq_path=/var/home/ap/postfix/bin/mailq \
        manpage_directory=/var/home/ap/postfix/man \
        meta_directory=/var/home/ap/postfix/etc \
        newaliases_path=/var/home/ap/postfix/bin/newaliases \
        openssl_path=/var/home/lib/openssl/bin/openssl \
        queue_directory=/var/home/ap/postfix/queue \
        sendmail_path=/var/home/ap/postfix/bin/sendmail \
        shlib_directory=/var/home/ap/postfix/lib \
        OPT='-O2 -march=corei7-avx -mtune=atom -fno-strict-aliasing' \
        CCARGS='-DHAS_SSL -DUSE_TLS -DHAS_PCRE -I/var/home/lib/openssl/include/openssl' \
        AUXLIBS='-L/var/home/lib/openssl/lib -lssl -lcrypto -lpcre -ldl -lz'

>What Linux distribution are you running, are you using some kind of prepared package ......?
# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

Please help someone.
What security concerns? If you are running postfix chrooted, you have to make sure that everything is in the path.Check what your /etc/ld.so.conf
run ldconfig /var/home/lib /var/home/lib/openssl/ /var/home/lib/openssl/lib
/etc/ld.so.conf and /etc/ld.so.conf.d/* you may have to add references to the openssl as /var/home/lib as a path where libraries can be found.

In a situation where you compile you programs, you would have to keep an eye on vulnerabilities and patch them yourself versus relying on Centos updates that manage the updates while maintaining the major/minor version of the programs to avoid any changes in functionality/behavior.
Hi!arnold!
Thanks for your comment.

I do not use chroot.

Is there only using 'ld.so.conf'?
Can I make a dynamic link with "LD_LIBRARY_PATH"?

Please help someone.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!
glad I could help, if you decide to compile apps from source, you might want to consider installing them in /usr/local as the path
sysconfdir=/etc/
systemstatedir=/var/
sendmail_ref=/usr/sbin/sendmail or make sure the symlink for /etc/alternatives/mta to maintain other apps that might use sendmail..

You can build your own RPM packages...... .and then install/remove/update them...
placing apps in /home could be an issue if you ever mount /home as nosuid, and other parameters.