Pivotal Knowledge Base

Follow

Fail to run "createlang" during PLR installation

Environment

  • HAWQ 1.3.x

Symptom

Follow the steps mentioned in installation guide, but got problem with "createlang plr", as shown below.

[gpadmin@admin ~]$ createlang plr -d dw1
createlang: language installation failed: ERROR: could not load library "/usr/local/hawq-1.3.0.1/lib/postgresql/plr.so": libR.so: cannot open shared object file: No such file or directory

Cause

With installation of PLR package $GPHOME/greenplum_path.sh file will be changed to add PLR related info for environment settings. For example R library path "/usr/local/hawq/./ext/R-2.13.0/lib64/R/lib" will be added to environment variable LD_LIBRARY_PATH. However to make the change effect, $GPHOME/greenplum_path.sh needs to be sourced again followed by HAWQ system restart.

Fix

As gpadmin user on HAWQ master host

1) Run "source $GPHOME/greenplum_path.sh"

2) Run "gpstop -a -r" to restart HAWQ

3) Run "createlang plr -d <dbname>"

Example

[gpadmin@admin ~]$ createlang plr -d dw1
[gpadmin@admin ~]$ psql -d dw1 -f $GPHOME/share/postgresql/contrib/plr.sql
SET
CREATE FUNCTION
CREATE FUNCTION
......

Comments

Powered by Zendesk