It is possible that some other version of Apache AGE or Postgres still has files in your system. To ensure that Postgres 13 is being used, you can run the command psql -c "SELECT version();"
in your terminal.
您的系统中可能仍有某些其他版本的Apacheage或Postgres文件。要确保使用的是Postgres13,可以在终端中运行命令psql-c“SELECT VERSION();”。
To address this issue, try running the following commands from your Apache AGE source code folder:
要解决此问题,请尝试从您的Apacheage源代码文件夹运行以下命令:
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config clean
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config install
If the error persists after running the commands to clean and rebuild Apache AGE, you could consider uninstalling both PostgreSQL and Apache AGE and then reinstalling them with other compatible versions.
如果在运行清理和重建apache age的命令后错误仍然存在,您可以考虑卸载PostgreSQL和apache age,然后使用其他兼容版本重新安装它们。
Note: you can use the branch PG13
instead of release/PG13/1.3.0
branch.
注意:您可以使用分支PG 13而不是release/PG 13/1.3.0分支。
I believe your ApacheAge extension is not built correctly. Try rebuilding it and make sure to run regression tests after building the extension. Try running the below commands in your ApacheAge source directory:
我相信您的ApacheAge扩展没有正确构建。尝试重新构建它,并确保在构建扩展之后运行回归测试。尝试在ApacheAge源目录中运行以下命令:
make clean PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
make install PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
make installcheck PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
The above commands will do a clean install of your ApacheAge source code.
以上命令将执行ApacheAge源代码的全新安装。
The error undefined symbol: hash_any_extended
suggests that the age.so
library is built against a different version of PostgreSQL you are using. You can try to download the source code from the official PostgreSQL directory and test different minor versions. There are minor versions of PostgreSQL from 13.0 to 13.11. Also, make sure you made a clean clone from the AGE repository to use with a different version of PostgreSQL. It prevents old files from older installations from polluting the new build.
错误UNDEFINED SYMBOL:HASH_ANY_EXTENDED表明age.so库是针对您正在使用的不同版本的PostgreSQL构建的。您可以尝试从官方的PostgreSQL目录下载源代码,并测试不同的次要版本。PostgreSQL有从13.0到13.11的次要版本。此外,确保您从AGE存储库中创建了一个干净的克隆,以便与不同版本的PostgreSQL一起使用。它可以防止来自旧安装的旧文件污染新构建。
The following line means that you are using an incompatible version of the PostgreSQL:
以下行表示您使用的是不兼容的PostgreSQL版本:
ERROR: could not load library "/usr/local/pgsql-13/lib/age.so": /usr/local/pgsql-13/lib/age.so: undefined symbol: hash_any_extended
Verify the compatible versions of PostgreSQL in the AGE Releases section github: AGE RELEASES
在AGE发布部分GitHub:AGE Release中验证PostgreSQL的兼容版本
You can install the compatible version of PostgreSQL by the following link:
PostgreSQL Downloads
您可以通过以下链接安装兼容版本的PostgreSQL:PostgreSQL下载
The safest way to fix it is to unistall postgres using make uninstall
and make clean
and also deleting the files in the path usr/local/pgsql-13
, then proceed to install postgres and the extension again and make sure the branches are the correct/compatible versions
修复该问题的最安全方法是使用make uninstall和make lean卸载postgres,并删除路径usr/local/pgsql-13中的文件,然后再次安装postgres和扩展模块,并确保分支是正确/兼容的版本
The error suggests that you might have different versions of PostgreSQL installed in your PC and the wrong version is being used when you try to create the AGE extension.
该错误表明您的PC上可能安装了不同版本的PostgreSQL,并且在您尝试创建AGE扩展时使用了错误的版本。
In your postgreSQL cli, type:
在您的PostgreSQL CLI中,键入:
SELECT version();
to find your version of PostgreSQL. If the returned version is not PosgreSQL 13, change the path to point to bin of the correct version. Make sure you have separate directories for different versions of PostgreSQL installed.
找到您的PostgreSQL版本。如果返回的版本不是PosgreSQL 13,则将路径更改为指向正确版本的bin。确保您为不同版本的PostgreSQL安装了单独的目录。
Otherwise, if the correct version is returned, another possibility is that AGE wasn't built correctly. Refer to @wendel's answer in that case.
否则,如果返回正确的版本,另一种可能是年龄构建不正确。在这种情况下,请参考@温德尔的回答。
first clean all the previous installation by using
首先使用以下命令清除所有以前的安装
sudo make clean
now reinstall the postgres v13 from the github make sure to checkout pg13
现在从GitHub重新安装Postgres V13,确保签出PG13
https://github.com/postgres/postgres.git
then install age, set the env and run
然后安装age,设置env并运行
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config clean
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
sudo make install PG_CONFIG=/usr/local/pgsql-13/bin/pg_config install
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config installcheck
I advise you to use the PG13 branch instead of the release/PG13/1.3.0 branch. I faced the same error when I used a newer version of age when I had installed and older version before.
You should reinstall postgreSQL 13 from source code. Then clone the git repository and move to the PG13 branch and install AGE from there using commands.
我建议您使用PG13分支,而不是Release/PG13/1.3.0分支。当我使用较新版本的AGE时,我遇到了同样的错误,而我之前安装了较旧的版本。您应该从源代码重新安装PostgreSQL13。然后克隆git存储库并移动到pg13分支,并使用命令从那里安装age。
make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config install
make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config installcheck
The error indicates that age.so
library is built against a different version of PostgreSQL.
To resolve the issue, try these options:
该错误指示age.so库是针对不同版本的PostgreSQL构建的。要解决此问题,请尝试以下选项:
Make sure you are using the correct and compatible branches of Apache
AGE and PostgreSQL.
确保您使用的是正确且兼容的Apacheage和PostgreSQL分支。
Clean your Apache AGE source code folder using this command:
使用以下命令清理您的Apacheage源代码文件夹:
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config clean
Run these commands to rebuild Apache AGE with the correct PostgreSQL
version:
运行以下命令以使用正确的PostgreSQL版本重建Apache旧版本:
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config install
If the error still exists then try uninstalling both Apache AGE and
PostgreSQL completely and reinstalling with compatible versions.
如果错误仍然存在,请尝试完全卸载Apacheage和PostgreSQL,然后使用兼容的版本重新安装。
You can check your PostgreSQL version using this command:
您可以使用以下命令检查您的PostgreSQL版本:
psql -c "SELECT version();
Also make sure you have clean clone of Apache AGE.
还要确保你有阿帕奇时代的干净克隆。
更多回答
Thanks it worked, btw it's make clean PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
with configuration file path provided, thanks again.
谢谢它起作用了,顺便说一句,它是make lean pg_config=/usr/local/pgsql-13/bin/pg_config,并提供了配置文件路径,再次感谢。
I'm glad it worked! Sorry about that, I forgot to include the file path in make clean
. I'll edit and add it now so that everything is clear
我很高兴它成功了!很抱歉,我忘了在Make Clear中包含文件路径。我现在要编辑并添加它,这样一切都清楚了
我是一名优秀的程序员,十分优秀!