ERROR: could not load library "/usr/local/pgsql-13/lib/age.so": /usr/local/pgsql-13/lib/age.so: undefined symbol: hash_any_extended

huangapple go评论57阅读模式
英文:

ERROR: could not load library "/usr/local/pgsql-13/lib/age.so": /usr/local/pgsql-13/lib/age.so: undefined symbol: hash_any_extended

问题

我使用源代码与PostgreSQL 13(REL_13_STABLE分支)一起工作,使用的是来自Apache AGE版本1.3.0的代码(release/PG13/1.3.0分支,来自apachea/age源代码)。按理说这个版本应该与我使用的PostgreSQL版本兼容,但是当我尝试执行CREATE EXTENSION age;时,出现以下错误:

postgres=# CREATE EXTENSION age;
ERROR:  could not load library "/usr/local/pgsql-13/lib/age.so": /usr/local/pgsql-13/lib/age.so: undefined symbol: hash_any_extended

尽管我检查了/usr/local/pgsql-13/lib/目录,age.so文件确实在那里,因此错误主要是因为我正在使用不兼容的PostgreSQL和Apache AGE版本,尽管我使用了支持PG13的分支。如果是这种情况,问题的原因是什么,如何解决?

英文:

I'm working with postgres 13 (REL_13_STABLE branch) from source code, and I'm using Apache AGE version 1.3.0 for that from (release/PG13/1.3.0 branch) from apachea/age source code which should be compatible with the version of postgres I'm using, but when I try to CREATE EXTENSION age; I get the following error:

postgres=# CREATE EXTENSION age;
ERROR:  could not load library "/usr/local/pgsql-13/lib/age.so": /usr/local/pgsql-13/lib/age.so: undefined symbol: hash_any_extended

though I checked /usr/local/pgsql-13/lib/ and age.so turned to be stored there, therefore the error mostly for stating that I'm using incompatible versions of Postgresql and Apache AGE, even though I'm using branches supporting PG13 which should be compatible. So if this is the case what is the cause for the problem and how to solve?.

答案1

得分: 1

可能有其他版本的Apache AGE或Postgres仍然存在于您的系统中。为了确保使用Postgres 13,您可以在终端中运行以下命令:psql -c "SELECT version();"

要解决这个问题,请尝试从您的Apache AGE源代码文件夹运行以下命令:

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

如果在运行清理和重建Apache AGE的命令后错误仍然存在,您可以考虑卸载PostgreSQL和Apache AGE,然后安装与其兼容的其他版本。

注意:您可以使用分支PG13代替release/PG13/1.3.0分支。

英文:

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.

To address this issue, try running the following commands from your Apache AGE source code folder:

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.

Note: you can use the branch PG13 instead of release/PG13/1.3.0 branch.

答案2

得分: 1

我相信你的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 

以上命令将对你的ApacheAge源代码进行干净的安装。

英文:

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:

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.

答案3

得分: 1

错误信息“未定义的符号:hash_any_extended”表明“age.so”库是针对与您使用的不同版本的PostgreSQL构建的。您可以尝试从官方PostgreSQL目录下载源代码,并测试不同的次要版本。PostgreSQL的次要版本范围从13.0到13.11。此外,请确保您已从AGE存储库进行了干净的克隆,以便与不同版本的PostgreSQL一起使用。这可以防止来自旧安装的旧文件污染新的构建。

英文:

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.

答案4

得分: 1

以下行表示您正在使用不兼容的 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

请在 AGE 发行版部分的 GitHub 页面上验证兼容的 PostgreSQL 版本:AGE RELEASES

您可以通过以下链接安装兼容的 PostgreSQL 版本:PostgreSQL Downloads

英文:

The following line means that you are using an incompatible version of the 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

You can install the compatible version of PostgreSQL by the following link:
PostgreSQL Downloads

答案5

得分: 0

最安全的解决方法是使用 make uninstallmake clean 卸载 postgres,同时删除路径 usr/local/pgsql-13 中的文件,然后重新安装 postgres 和扩展,并确保分支是正确/兼容的版本。

英文:

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

答案6

得分: 0

错误提示表明您的计算机上可能安装了不同版本的PostgreSQL,并且在尝试创建AGE扩展时使用了错误的版本。

在您的PostgreSQL命令行界面中,键入:

SELECT version();

以查找您的PostgreSQL版本。如果返回的版本不是PosgreSQL 13,请更改路径以指向正确版本的bin目录。确保您已安装不同版本的PostgreSQL时使用不同的目录。

否则,如果返回了正确的版本,则另一种可能性是AGE未正确构建。在这种情况下,请参考@wendel的回答。

英文:

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.

In your postgreSQL cli, type:

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.

Otherwise, if the correct version is returned, another possibility is that AGE wasn't built correctly. Refer to @wendel's answer in that case.

答案7

得分: 0

I'm here to provide translations. Here's the translation of the provided text:

首先,通过以下方式清除所有先前的安装:

sudo make clean

然后,从GitHub重新安装 PostgreSQL 版本 13,请确保检出 pg13 分支:

https://github.com/postgres/postgres.git

接下来,安装 age,设置环境并运行以下命令:

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

请注意,这些命令可能需要根据您的系统配置进行适当调整。

英文:

first clean all the previous installation by using

sudo make clean

now reinstall the postgres v13 from the github make sure to checkout pg13

https://github.com/postgres/postgres.git

then install age, set the env and run

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

答案8

得分: 0

我建议您使用PG13分支,而不是release/PG13/1.3.0分支。当我在之前安装了旧版本后,当我使用更新的age版本时,我遇到了相同的错误。
您应该从源代码重新安装PostgreSQL 13,然后克隆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

英文:

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.

make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config install
make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config installcheck

答案9

得分: -1

以下是翻译好的部分:

错误提示表明 age.so 库是根据不同版本的 PostgreSQL 构建的。
要解决此问题,请尝试以下选项:

  • 确保您使用的是与 Apache AGE 和 PostgreSQL 兼容的正确分支。

  • 使用以下命令清理您的 Apache AGE 源代码文件夹:

    sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config clean
    
  • 使用正确的 PostgreSQL 版本重新构建 Apache AGE,运行以下命令:

    sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config
    sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config install
    
  • 如果错误仍然存在,请尝试彻底卸载 Apache AGE 和 PostgreSQL,然后重新安装兼容版本。

  • 您可以使用以下命令检查您的 PostgreSQL 版本:

    psql -c "SELECT version();
    
  • 同样,请确保您拥有 Apache AGE 的干净克隆。

英文:

The error indicates that age.so library is built against a different version of PostgreSQL.
To resolve the issue, try these options:

  • Make sure you are using the correct and compatible branches of Apache
    AGE and PostgreSQL.

  • Clean your Apache AGE source code folder using this command:

    sudo make PG_CONFIG=/usr/local/pgsql-13/bin/pg_config clean
    
  • Run these commands to rebuild Apache AGE with the correct PostgreSQL
    version:

    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.

  • You can check your PostgreSQL version using this command:

    psql -c "SELECT version();
    
  • Also make sure you have clean clone of Apache AGE.

huangapple
  • 本文由 发表于 2023年5月11日 02:07:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76221435.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定