AGE的权限问题

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

Permission issue for AGE

问题

在安装Apache AGE的过程中,我在PostgreSQL 14上使用master分支时遇到了以下错误:

/usr/bin/install: cannot remove '/usr/local/pgsql/lib/age.so': Permission denied
make: *** [/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/Makefile.shlib:456: install-lib-shared] Error 1

我应该怎么解决这个问题?

我尝试使用命令sudo chown <user> /usr/local/pgsql/,但这并没有帮助,错误仍然存在。有没有解决这个问题的提示?

英文:

While installing Apache AGE from master branch, on PostgreSQL 14, the following error appeared while issuing make install:

/usr/bin/install: cannot remove &#39;/usr/local/pgsql/lib/age.so&#39;: Permission denied
make: \*\*\* \[/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/Makefile.shlib:456: install-lib-shared\] Error 1

What should I do to fix this?

What I tried was using the command sudo chown &lt;user&gt; /usr/local/pgsql/. This didn't help and the error persisted. Any tips on solving this?

答案1

得分: 2

首先,你需要安装与 PostgreSQL 兼容的 AGE 版本。如果版本不兼容,那么 make install 将无法工作。由于你正在使用 PostgreSQL v14,你需要切换到 AGE 的 PG14 分支

如果你已经安装了兼容的版本,那么问题可能是权限的原因。为此,你需要成为超级用户,或者可以在命令中使用 -R 参数。使用 -R 参数可以更改目录及其所有内容的所有权。

英文:

First of all you need to have the AGE compatible version of PostgreSQL. If versions are not compatible then make install is not gonna work. As you are working with PostgreSQL v14 you need to checkout to PG14 branch of AGE.

If you have installed compatible versions then its the issue with permissions. For that you have to be super user or you can use -R with the command. Its because -R changes the ownership of directory and all its content.

答案2

得分: 0

尝试使用chown命令的-R选项,这样它将更改文件夹中所有文件的所有者:

sudo chown -R <user> /usr/local/pgsql/

这可能会解决问题。

英文:

Try using chown with the -R flag, so it will change the owner of all the files within the folder:

sudo chown -R &lt;user&gt; /usr/local/pgsql/

This may fix the issue.

答案3

得分: 0

希望 sudo chown -R <user> /usr/local/pgsql/ 已经解决了你的问题。

根据官方文档,AGE 目前还不支持 PostgreSQL-14。

参考链接

英文:

I hope sudo chown -R &lt;user&gt; /usr/local/pgsql/ has solved your problem.

As per official documentation, AGE doesn't support PostgreSQL-14 yet.

Reference

答案4

得分: 0

你的库还没有安装,请先执行以下命令:

sudo make clean

然后执行以下命令:

brew install build-essential libreadline zlib flex bison

接着安装 PostgreSQL 12 版本,然后执行 sudo make。

英文:

your libraries are not installed first do

sudo make clean

then do

brew install build-essential libreadline zlib flex bison

then install postgres 12 version
after that do sudo make

答案5

得分: 0

首先,你需要使用sudo运行安装命令:

sudo make PG_CONFIG=/the/pg_config/path/of/postgres install

还要确保你的postgres/bin目录具有正确的权限:

sudo chown -R <用户名> path/to/postgres/
英文:

First of all you need to run the commands of installation with sudo:

sudo make PG_CONFIG=/the/pg_config/path/of/postgres install

also make sure that the repositories of your postgres/bin have the correct permissions:

sudo chown -R &lt;username&gt; path/to/postgres/

答案6

得分: 0

要将其安装到系统目录中,只需运行以下命令:

sudo make PG_CONFIG=/path/to/pg_config install

然后,您就不需要在以下命令中使用-R标志:

sudo chown <user> /usr/local/pgsql/
英文:

To install in the system directory, simply run:

sudo make PG_CONFIG=/path/to/pg_config install

Then you dont have to use the -R flag for the following:

sudo chown &lt;user&gt; /usr/local/pgsql/

答案7

得分: 0

为了解决这个问题,首先你需要运行安装命令:

sudo make install

然后你需要使用chown命令来更改文件的所有者,例如:

sudo chown -R <user>/usr/local/pgsql
英文:

To solve this issue, first you need to run the installation command:

sudo make install

then you have to use chown command to change the owner of the file like:

sudo chown -R &lt;user&gt;/usr/local/pgsql

答案8

得分: 0

如其他人所提到的,尝试使用-R标志。同时,使用ls -l命令检查文件的权限,并确认它是否具有相关权限。

英文:

As others have mentioned try using the -R flag. Also check the permissions the file has using ls -l and confirm it has the relevant permissions or not.

答案9

得分: 0

安装过程遇到了权限问题导致出现错误。它没有足够的权限来替换 'age.so' 文件为新文件。
您可以使用以下命令检查所有权和权限,然后根据所需的权限进行相应的更改:ls -ld /usr/local/pgsql/lib

英文:

The installation process is encountering an error due to a permission issue. It doesn't have the necessary permissions to replace the 'age.so' file with a new one.
You can check ownership rights and permission using the following command and then make changes accordingly based on the necessary permissions: ls -ld /usr/local/pgsql/lib

答案10

得分: -1

你需要在用户名之前使用-R标志。

这样,你将为相应目录中的所有路径和文件应用权限。

英文:

you need to use the -R flag before username.

In this way you will apply the permissions for all the paths and files inside the respective directories

答案11

得分: -1

我认为您必须是超级用户才能正确安装AGE。还要使用适当版本的AGE(PG 11、12、13)。首先尝试重新安装您的AGE,在此之前使用以下命令:

sudo chown -R <user> /usr/local/pgsql/

还要在make install命令前使用sudo。希望这能帮到您。

英文:

I think you must be a super user to properly install AGE. Also use the proper vesions of AGE (PG 11,12,13). For starters try reinstalling your AGE and Before that use the command

sudo chown -R &lt;user&gt; /usr/local/pgsql/

Also use sudo with the make install command. Hope this helps

答案12

得分: -1

有人在这里提到了sudo chown -R <user> /usr/local/pgsql/,用于递归设置所有者权限。

但你也可以尝试使用sudo make PG_CONFIG=/path/to/pg_config install直接将AGE安装到系统目录中。

英文:

Someone here has mentioned sudo chown -R &lt;user&gt; /usr/local/pgsql/ to recursively set the owner privileges.

But you can also try installing AGE directly into the system directory using sudo make PG_CONFIG=/path/to/pg_config install

答案13

得分: -1

当选择postgres和age的版本时,请尝试使用11版本或12版本。PG11和P12对于age有长期支持。请参考https://age.apache.org/age-manual/master/intro/setup.html。

英文:

When choosing the versions for both postgres and age, try using version 11 or version 12.PG11 and P12 have for LTS for age.
See https://age.apache.org/age-manual/master/intro/setup.html

答案14

得分: -1

首先,请确保AGE和PostgreSQL的版本是否相互兼容。

如果问题仍然存在,很可能是由于权限问题。

尝试运行以下命令:

sudo chown -R <user> /usr/local/pgsql/

使用-R标志将为目录中的所有文件和路径授予权限。

英文:

First of all, make sure that the versions for both AGE and PostgreSQL are compatible with each other or not.

If the issue persists, it is more likely due to permissions.

Try running the following command:

sudo chown -R &lt;user&gt; /usr/local/pgsql/

Using the -R flag will let you have permissions for all files and paths in a directory.

答案15

得分: -1

你正在使用正确的命令,但仍然无法正常工作,这可能是因为你没有使用-R标志。请按照以下方式更正你的命令,然后尝试安装。

sudo chown -R <user> /usr/local/pgsql/

希望这能解决问题。

英文:

You are using right command still it is not working, this may be because you are not using the -R flag. Rectify your command like this and then try to install.

sudo chown -R &lt;user&gt; /usr/local/pgsql/

Hope this will fix the issue

答案16

得分: -2

使用sudo与make install命令:
由于您正在修改像/usr/local/pgsql这样的系统级目录,您可能需要超级用户权限。尝试使用sudo运行make install命令:

sudo make install

这将以提升的权限执行安装过程,允许它删除旧的age.so文件并安装新的文件。

检查所有权和权限:
由于您已经尝试使用sudo chown /usr/local/pgsql更改所有权,但请确保您使用的是正确的用户名,并且所有权更改成功。还要确保lib目录及其内容的权限设置正确。

sudo chown -R /usr/local/pgsql
sudo chmod -R 755 /usr/local/pgsql

替换为您的用户名。

手动删除现有文件:
如果您仍然遇到权限问题,可以尝试在运行make install之前手动删除现有的age.so文件。

sudo rm /usr/local/pgsql/lib/age.so

删除文件后,再次尝试运行make install命令。

使用make clean命令:
您可以使用make clean命令在尝试重新安装之前清理构建。然后,再次使用sudo make install命令进行安装。

希望对您有所帮助!

英文:

Use sudo with make install:
Since you're modifying system-wide directories like /usr/local/pgsql, you might need superuser privileges. Try running the make install command using sudo:

sudo make install

This should execute the installation process with elevated permissions, allowing it to remove the old age.so and install the new one

Check Ownership and Permissions:

Since you've already tried changing ownership using sudo chown <user> /usr/local/pgsql, but make sure you're using the correct username and that the ownership change was successful. Also, ensure that the permissions are set correctly on the lib directory and its contents.

sudo chown -R <user> /usr/local/pgsql
sudo chmod -R 755 /usr/local/pgsql

Replace the <user> with your username

Remove the Existing File Manually:
If you're still facing permission issues, you can try manually removing the existing age.so file before running make install.

sudo rm /usr/local/pgsql/lib/age.so

After removing the file, try running make install again.

Use make clean:

You can use make clean command to clean the build before trying the installation again. After that, try the installation process again using sudo make install.

Hope it helps!

huangapple
  • 本文由 发表于 2023年8月8日 21:00:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76859829.html
匿名

发表评论

匿名网友

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

确定