<p>我能够重现错误,似乎路径没有设置为包括<code>/usr/local/greenplum-db-4.2.2.4/lib/python/gppylib/mainUtils.py</code>,这是我安装的包所在的位置。当我<code>export PYTHONPATH=/usr/local/greenplum-db-4.2.2.4/lib/python/</code>时,我收到了另一条错误消息:</p>
<pre><code>Error: unable to import module: dlopen(/usr/local/greenplum-db-4.2.2.4/lib/python/pygresql/_pg.so, 2): no suitable image found. Did find:
/usr/local/greenplum-db-4.2.2.4/lib/python/pygresql/_pg.so: mach-o, but wrong architecture
</code></pre>
<p>我怀疑这是因为pygresql是为32位体系结构编译的,而我使用的是x86_64(与您首先找不到gppylib的问题无关):</p>
^{2}$
<p>还请注意自述中说:</p>
<blockquote>
<hr/>
<p>REQUIRED OS SYSTEM SETTINGS FOR GREENPLUM DATABASE</p>
<hr/>
<p>These must be set on all Greenplum hosts (master and segments). Make
sure you restart your system after adding or changing kernel
parameters.</p>
<p>Add all of the following to /etc/sysctl.conf:</p>
<p>kern.sysv.shmmax=2147483648</p>
<p>kern.sysv.shmmin=1</p>
<p>kern.sysv.shmmni=64</p>
<p>kern.sysv.shmseg=16</p>
<p>kern.sysv.shmall=524288</p>
<p>kern.maxfiles=65535</p>
<p>kern.maxfilesperproc=65535</p>
<p>net.inet.tcp.msl=60</p>
<p>If using DHCP, add the following line to /etc/hostconfig:</p>
<p>HOSTNAME=""</p>
<p>You would then use this host name when exchanging ssh keys and when
initializing your Greenplum Database system.</p>
<hr/>
<p>POST INSTALLATION STEPS</p>
<hr/>
<p>These are the high-level steps to configure and initialize a new
Greenplum Database instance. For detailed instructions, please see
the 'Greenplum Database Installation Guide' available for download
from <a href="http://powerlink.emc.com" rel="nofollow">http://powerlink.emc.com</a></p>
<ol>
<li><p>Allocate a 'gpadmin' OS user to own and run your installation.
This user must exist on all Greenplum hosts.</p></li>
<li><p>Source the greenplum_path.sh file in your 'gpadmin' user
profile (.bashrc) of your master host. This sets the
environment variables needed by Greenplum Database.</p></li>
<li><p>Use the gpseginstall utility to install and configure the
Greenplum software on all hosts.</p></li>
<li><p>Create your data directory locations on all Greenplum hosts.</p></li>
<li><p>Use the gpinitsystem utility on the master host to
initialize and start your Greenplum Database system. This
utility requires a configuration file and a host file.
For example:</p>
<p>gpinitsystem -c gpinitsystem_config -h hostfile_gpinitsystem</p>
<p>A sample multi-node initialization configuration file can
be found in $GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config.
Edit the example files to reflect your desired Greenplum Database configuration.</p></li>
</ol>
<hr/>
<p>ABOUT YOUR INSTALLATION</p>
<hr/>
<p>The Greenplum Database installer installs the following files and
directories:</p>
<ul>
<li><p>greenplum_path.sh - Greenplum Database environment variables.</p></li>
<li><p>GPDB-LICENSE.txt - Greenplum license agreement.</p></li>
<li><p>LICENSE.thirdparty - Licenses for third-party tools</p></li>
<li><p>bin - Greenplum Database server programs, client programs, and
management tools.</p></li>
<li><p>demo - Greenplum Database demonstration programs.</p></li>
<li><p>docs - Greenplum Database documentation.</p></li>
<li><p>etc - Sample configuration file for OpenSSL.</p></li>
<li><p>ext - Bundled programs (such as Python) used by some
Greenplum Database utilies.</p></li>
<li><p>include - Greenplum Database and PostgreSQL header files.</p></li>
<li><p>lib - Greenplum Database and PostgreSQL library files.</p></li>
<li><p>sbin - Supporting/Internal scripts and programs.</p></li>
<li><p>share - PostgreSQL sample files and templates.</p></li>
</ul>
<hr/>
<p>GREENPLUM DATABASE DOCUMENTATION</p>
<hr/>
<p>The following documentation is available for download from
<a href="http://powerlink.emc.com" rel="nofollow">http://powerlink.emc.com</a>:</p>
<p>(All Greenplum Database Installations)</p>
<ul>
<li><p>GPDB README.pdf - Release notes for this version of Greenplum Database</p></li>
<li><p>GPInstallGuide.pdf - Greenplum Database Installation Guide</p></li>
<li><p>GPAdminGuide.pdf - Greenplum Database Administrator Guide</p></li>
<li><p>GPPerfmonAdminGuide.pdf - Greenplum Performance Monitor Administrator Guide</p></li>
</ul>
</blockquote>