Cron psql:加载共享库时出错:libpq.so.5:无法打开共享对象文件:没有此类文件或目录
我的path变量中有psql路径。crontab路径是Cron psql:加载共享库时出错:libpq.so.5:无法打开共享对象文件:没有此类文件或目录,cron,psql,greenplum,Cron,Psql,Greenplum,我的path变量中有psql路径。crontab路径是usr:/usr/bin:/bin 我添加所有用户目录,然后执行cron作业 Default PATH for usr:/usr/bin:/bin user is:gpadmin PATH for usr:/usr/bin:/bin:/usr/local/greenplum-db/./bin:/usr/local/greenplum-db/./ext/python/bin:/home/gpadmin/anaconda3/bin:/usr/li
usr:/usr/bin:/bin
我添加所有用户目录,然后执行cron作业
Default PATH for usr:/usr/bin:/bin
user is:gpadmin
PATH for usr:/usr/bin:/bin:/usr/local/greenplum-db/./bin:/usr/local/greenplum-db/./ext/python/bin:/home/gpadmin/anaconda3/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/home/gpadmin/bin
我的脚本如下(由crontab执行):
在crontab中的命令之前添加了.bash_配置文件
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# test entry
#* * * * * echo `whoami` > /home/2125/RR_Dev_Code/ETL/crontab.test
59 13 * * 4 . $HOME/.bash_profile;/home/2125/RR_Dev_Code/RR_load_v3.sh
感谢您在此处发布的答案:
看到所有的艰苦工作现在都自动运行,真是松了一口气。在crontab中的命令之前添加了.bash_配置文件
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# test entry
#* * * * * echo `whoami` > /home/2125/RR_Dev_Code/ETL/crontab.test
59 13 * * 4 . $HOME/.bash_profile;/home/2125/RR_Dev_Code/RR_load_v3.sh
感谢您在此处发布的答案:
看到所有的艰苦工作现在都自动运行,真是松了一口气。我添加了第二个答案,以防有人想使用除已选择的答案之外的其他方法。乔恩·罗伯茨提出的解决方案非常有效 只需运行:“source/usr/local/greenplum db/greenplum_path.sh”
干杯我添加了第二个答案,以防有人想使用除已选择答案之外的其他方法。乔恩·罗伯茨提出的解决方案非常有效 只需运行:“source/usr/local/greenplum db/greenplum_path.sh”
干杯你找到/usr/local/greenplum db/greenplum_path.sh了吗?@JonRoberts谢谢你的建议。我也会试试这个。在命令解决meDid you source/usr/local/greenplum db/greenplum_path.sh问题之前添加.bash_profile?@JonRoberts感谢您的建议。我也会试试这个。在命令之前添加.bash_profile为我解决了问题
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# test entry
#* * * * * echo `whoami` > /home/2125/RR_Dev_Code/ETL/crontab.test
59 13 * * 4 . $HOME/.bash_profile;/home/2125/RR_Dev_Code/RR_load_v3.sh