Pivotal Knowledge Base


Installation of pg_crypto Fails with "ERROR: could not load library "xxxx/pgcrypto.so": xxxx/lib/postgresql/pgcrypto.so: undefined symbol: FIPS_mode_set"


  • Pivotal Greenplum Database (GPDB) 4.2.x and 4.3.x
  • Operating System- Red Hat Enterprise Linux (RHEL) 6.x


Installation of pgcrypto fails with an error.

Error Message

[gpadmin@gpdbsne lib64]$ psql -d <database-name> -f $GPHOME/share/postgresql/contrib/pgcrypto.sql
psql:/usr/local/greenplum-db/./share/postgresql/contrib/pgcrypto.sql:9: ERROR: could not load library "/usr/local/greenplum-db-": /usr/local/greenplum-db- undefined symbol: FIPS_mode_set


The issue is caused when the wrong crypto libraries are referenced.

For example, the crypto library "libcrypto.so.0.9.8" references the crypto library in the "greenplum-perfmon-web-" installation directory when it should be referencing the Greenplum database libraries.

[gpadmin@gpdbsne lib64]$ ldd /usr/local/greenplum-db-
	linux-vdso.so.1 =>  (0x00007fffa01ff000)
	libcrypto.so.0.9.8 => /usr/local/greenplum-perfmon-web- (0x00007f3a9cd21000)
	libz.so.1 => /usr/local/greenplum-cc-web/./lib/libz.so.1 (0x00007f3a9cb0a000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f3a9c75e000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f3a9c55a000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003601e00000)

This is caused by the method used to set the environment variables when the user connects to the Unix server. For example, in this case, the LD_LIBRARY_PATH environment variable is set.

[gpadmin@gpdbsne lib64]$ env | grep LD

As shown in the setting above, the following locations "/usr/local/greenplum-perfmon-web-" & "/usr/local/greenplum-cc-web-" are used to reference the crypto libraries first, and this is caused by the method used to set up the environment path in the .bashrc file ( user updated ).

Note: The last line of the source always uses the first batch to check the path of the libraries.

source /usr/local/greenplum-db/greenplum_path.sh
source /usr/local/greenplum-db/gpcc_path.sh
source /usr/local/greenplum-db/gpperfmon_path.sh

The cause here is that the postmaster of the database points to the crypto file of two different installations and not the Greenplum database.

[gpadmin@gpdbsne lib64]$ lsof -p 31949  | grep crypto
postgres 31949 gpadmin  mem    REG              253,1   309353 1191079 /usr/local/greenplum-cc-web-
postgres 31949 gpadmin  mem    REG              253,1  1788415 1325183 /usr/local/greenplum-perfmon-web-
[gpadmin@gpdbsne lib64]$ 


Follow the steps to resolve this issue:

  1. Correct the environment to have the Greenplum library sourced at the end.
    source /usr/local/greenplum-db/gpcc_path.sh
    source /usr/local/greenplum-db/gpperfmon_path.sh
    source /usr/local/greenplum-db/greenplum_path.sh
  2. When you refresh this, the path now points to the correct location.
    [gpadmin@gpdbsne lib64]$ env | grep LD
  3. Restart the database and the new postmaster process will now point to the correct libraries.
    [gpadmin@gpdbsne lib64]$ lsof -p 19896 | grep crypto
    postgres 19896 gpadmin  mem    REG              253,1   583652 1071088 /usr/local/greenplum-db-
    postgres 19896 gpadmin  mem    REG              253,1  1855858 1071063 /usr/local/greenplum-db-
    [gpadmin@gpdbsne lib64]$ 
  4. Re-execute the pgcrypto file again using the command below.
    psql -d <database-name> -f $GPHOME/share/postgresql/contrib/pgcrypto.sql

Additional Information

The other issue that can lead to the problems discussed in this article are the following:

  • When the OpenSSL rpm is updated on the server, if the OpenSSL rpm is updated then the server might need a reboot to reload the packages.
  • Wrong extension package (gppkg) is downloaded for the version of the database.


Powered by Zendesk