Running pgcrypto.sql Results in "ERROR: could not access file "$libdir/pgcrypto": No such file or directory"
search cancel

Running pgcrypto.sql Results in "ERROR: could not access file "$libdir/pgcrypto": No such file or directory"

book

Article ID: 296191

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Symptoms:

After a database upgrade, migrating the pgcrypto package using gppkg --migrate can result in the following when trying to run this command on a new database:

psql -d <DBNAME> -f $GPHOME/share/postgresql/contrib/pgcrypto.sql

Error Message:

psql:/greenplum/greenplum-db-4.3.10.0/share/postgresql/contrib/pgcrypto.sql:189: ERROR: could not access file "$libdir/pgcrypto": No such file or directory (seg2 sdw1:40000 pid=23102) 
psql:/greenplum/greenplum-db-4.3.10.0/share/postgresql/contrib/pgcrypto.sql:197: ERROR: could not access file "$libdir/pgcrypto": No such file or directory (seg14 sdw3:40002 pid=23151) 
psql:/greenplum/greenplum-db-4.3.10.0/share/postgresql/contrib/pgcrypto.sql:202: ERROR: could not access file "$libdir/pgcrypto": No such file or directory (seg66 sdw6:40002 pid=35422)
Attempting to uninstall in the package using gppkg -r will give you a different error:

IOError 
20170817:09:51:07:030229 gppkg:bdtcstr21n1:gpadmin-[ERROR]:- 
Traceback (most recent call last): 
File "/greenplum/greenplum-db/lib/python/gppylib/commands/base.py", line 211, in run 
self.cmd.run() 
File "/greenplum/greenplum-db/lib/python/gppylib/operations/__init__.py", line 53, in run 
self.ret = self.execute() 
File "/greenplum/greenplum-db/lib/python/gppylib/operations/utils.py", line 52, in execute 
raise ret

Environment


Cause

Using gppkg --migrate on the pgcrypto package may copy the package files only to the master and not the segments.

 

Resolution

Check to make sure the pgcrypto.sql file exists in the segments. If they do exist, you can run the following command to have the master copy it's package files to all the segments:

If gppkg -c does not work, you can go to the package archive directory and manually remove the package and reinstall using gppkg -i:

cd $GPHOME/share/packages/archive
mv pgcrypto-ossv1.1_pv1.2_gpdb4.3orca-rhel5-x86_64.gppkg /tmp
gppkg -i <pgcryto gppkg file location>