# 构建错误：创建扩展“vector”的权限被拒绝

**URL:** <https://meta.discourse.org/t/build-error-permission-denied-to-create-extension-vector/378562>\
**Category:** Support\
**Created:** [2025年八月14日 10:40 UTC](https://meta.discourse.org/t/build-error-permission-denied-to-create-extension-vector/378562 "2025-08-14T10:40:21Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![yaxu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yaxu/32/178942_2.png) [@yaxu](https://meta.discourse.org/u/yaxu)\
**Post date:** [2025年八月14日 10:40 UTC](https://meta.discourse.org/t/build-error-permission-denied-to-create-extension-vector/378562/1 "2025-08-14T10:40:21Z")

</div>

您好，

我在重建我的多站点 discourse 安装时遇到问题。我收到了下面粘贴的错误。

- 我正在以 root 身份运行 `./launcher rebuild app`。
- /var/discourse 中的 `git status` 显示我已与 main 分支同步。
- 它报告正在运行 postgres 15.13：  
`2025-08-14 10:35:04.390 UTC [45] LOG: starting PostgreSQL 15.13 (Debian 15.13-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit`
- 我已禁用除 docker\_manager 之外的所有插件。

以下是错误：

```plaintext
I, [2025-08-14T10:35:56.213949 #1] INFO -- : > cd /var/www/discourse &amp;&amp; su discourse -c 'find /var/www/discourse/vendor/bundle -name cache -not -path "/var/www/discourse/vendor/bundle/gems/*" -type d -exec rm -rf {} + '
I, [2025-08-14T10:35:56.325831 #1] INFO -- : 
I, [2025-08-14T10:35:56.325961 #1] INFO -- : > cd /var/www/discourse &amp;&amp; su discourse -c 'find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} + '
I, [2025-08-14T10:35:56.430781 #1] INFO -- : 
I, [2025-08-14T10:35:56.431139 #1] INFO -- : > cd /var/www/discourse &amp;&amp; sudo -E -u discourse bundle exec rake multisite:migrate
`/root` is not writable.
Bundler will use `/tmp/bundler20250814-776-hjo98w776' as your home directory temporarily.
2025-08-14 10:36:05.626 UTC [872] discourse@b_discourse ERROR: permission denied to create extension "vector"
2025-08-14 10:36:05.626 UTC [872] discourse@b_discourse HINT: Must be superuser to create this extension.
2025-08-14 10:36:05.626 UTC [872] discourse@b_discourse STATEMENT: CREATE EXTENSION IF NOT EXISTS "vector"
2025-08-14 10:36:05.627 UTC [872] discourse@b_discourse ERROR: current transaction is aborted, commands ignored until end of transaction block
2025-08-14 10:36:05.627 UTC [872] discourse@b_discourse STATEMENT: SELECT 1 FROM pg_available_extensions WHERE name = 'vector';
2025-08-14 10:36:05.753 UTC [873] discourse@c_discourse ERROR: permission denied to create extension "vector"
2025-08-14 10:36:05.753 UTC [873] discourse@c_discourse HINT: Must be superuser to create this extension.
2025-08-14 10:36:05.753 UTC [873] discourse@c_discourse STATEMENT: CREATE EXTENSION IF NOT EXISTS "vector"
2025-08-14 10:36:05.753 UTC [873] discourse@c_discourse ERROR: current transaction is aborted, commands ignored until end of transaction block
2025-08-14 10:36:05.753 UTC [873] discourse@c_discourse STATEMENT: SELECT 1 FROM pg_available_extensions WHERE name = 'vector';
2025-08-14 10:36:05.870 UTC [874] discourse@d_discourse ERROR: permission denied to create extension "vector"
2025-08-14 10:36:05.870 UTC [874] discourse@d_discourse HINT: Must be superuser to create this extension.
2025-08-14 10:36:05.870 UTC [874] discourse@d_discourse STATEMENT: CREATE EXTENSION IF NOT EXISTS "vector"
2025-08-14 10:36:05.870 UTC [874] discourse@d_discourse ERROR: current transaction is aborted, commands ignored until end of transaction block
2025-08-14 10:36:05.870 UTC [874] discourse@d_discourse STATEMENT: SELECT 1 FROM pg_available_extensions WHERE name = 'vector';

```

非常感谢任何帮助/提示！

---

_[View the full topic](https://meta.discourse.org/t/build-error-permission-denied-to-create-extension-vector/378562)._
