# Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' 失败，返回

**URL:** https://meta.discourse.org/t/pups-su-postgres-c-psql-discourse-c-alter-schema-public-owner-to-discourse-failed-with-return/254858
**Category:** Self-hosting
**Created:** [2023年二月11日 16:13 UTC](https://meta.discourse.org/t/pups-su-postgres-c-psql-discourse-c-alter-schema-public-owner-to-discourse-failed-with-return/254858 "2023-02-11T16:13:08Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2023年二月11日 19:06 UTC](https://meta.discourse.org/t/pups-su-postgres-c-psql-discourse-c-alter-schema-public-owner-to-discourse-failed-with-return/254858/2 "2023-02-11T19:06:17Z")

</div>

Originally sent in [general](https://meta.discourse.org/chat/c/-/508)

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/ratnam_raju_varsala/48/292923_2.png)

Ratnam\_Raju\_Varsala

嗨 @Canapin，我该如何将插件集成到 docker 应用程序中？

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/heliosurge/48/131899_2.png)

Heliosurge

> [@Install plugins on a self-hosted site](https://meta.discourse.org/t/install-plugins-in-discourse/19157?u=heliosurge):
>
> warning This guide assumes that you have a self-hosted standard installation. We only support the standard method of install here, so these instructions assume you have a [standard install](https://meta.discourse.org/t/142537?silent=true). warning This guide only applies to self-hosted Discourse instances. If you are using a managed hosting service, the available plugins are controlled by your hosting provider. For example, on our hosting [these specific plugins](https://www.discourse.org/plugins) are available by hosting tier. In this tutorial, we’ll install the [Discours…](https://github.com/discourse/discourse-solved)

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/ratnam_raju_varsala/48/292923_2.png)

Ratnam\_Raju\_Varsala

失败  
--------------------

Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' 失败，返回 #\<Process::Status: pid 54 exit 2\>

失败位置：/usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec\_command.rb:117:in `spawn'

exec 失败，参数为 "su postgres -c 'psql $db\_name -c \"alter schema public owner to $db\_user;\"'"

引导失败，退出代码 2

**引导失败** 请向上滚动查找更早的错误消息，可能不止一个。

./discourse-doctor 可能有助于诊断问题。

4079c40b96373f2f33049a30414bc383bdb52a1a678a9f0cc9f7

root@community-online:/var/discourse# /discourse-doctor

-bash: /discourse-doctor: No such file or directory

在 app.yml 文件中添加插件后，我遇到了这个错误。

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/heliosurge/48/131899_2.png)

Heliosurge

你能否发布你在 app.yml 中将插件添加到 docker 的那部分内容？

格式必须非常精确。  
这有点麻烦，但通常一次只安装和重建 2 个插件。  
你想安装什么插件？

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/ratnam_raju_varsala/48/292923_2.png)

Ratnam\_Raju\_Varsala

在添加插件之前，网站运行正常，添加此插件后，网站就无法访问了。

- sudo -E -u discourse git clone [GitHub - jannolii/discourse-topic-trade-buttons](https://github.com/jannolii/discourse-topic-trade-buttons.git)

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/heliosurge/48/131899_2.png)

Heliosurge

删除你聊天帖子的一部分。你有一些敏感信息。只需要显示 $home 类型的东西和插件信息的部分。

你的 trade buttons 插件被添加了两次。删除这两个实例，然后尝试重建，看看网站是否恢复。

如果聊天允许，只需要从这里向下显示，并用类似 ´`´...´`´ 的东西括起来。

 ![Screenshots_2023-02-11-15-00-34.png](https://global.discourse-cdn.com/meta/original/4X/8/d/8/8d81d20cff9ed77c56b15455665ae092d7b98a0f.png)

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/ratnam_raju_varsala/48/292923_2.png)

Ratnam\_Raju\_Varsala

没有添加两次。  
我在这里粘贴 app.yml 的完整内容。

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/jammydodger/48/254611_2.png)

JammyDodger

我认为最好在主题中讨论这个问题。我将把这些消息移过去。👍

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/ratnam_raju_varsala/48/292923_2.png)

Ratnam\_Raju\_Varsala

已删除

 ![](https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/heliosurge/48/131899_2.png)

Heliosurge

好的，Jam。你能删除他的敏感信息，只保留插件信息吗？

---

_[View the full topic](https://meta.discourse.org/t/pups-su-postgres-c-psql-discourse-c-alter-schema-public-owner-to-discourse-failed-with-return/254858)._
