【问题标题】:Unable to install postgresql-client client on AWS Cloud Shell无法在 AWS Cloud Shell 上安装 postgresql-client 客户端
【发布时间】:2022-12-05 18:00:48
【问题描述】:

我正在尝试从 AWS Cloud shell 安装 postgresql 客户端,但出现以下错误:

Preparing your terminal...
Failed to open session : Timed out while opening the session
Trying to open session (Retrying. Attempt #1)
Connection is lost. Please refresh the browser to re-establish the connection.
[cloudshell-user@ip$ Try these commands to get started:
aws help  or  aws <command> help  or  aws <command> --cli-auto-prompt
[cloudshell-user@ip$ sudo apt install postgresql-client
sudo: apt: command not found
[cloudshell-user@ip$ 

我正在使用以下命令安装 postgresql 客户端。

sudo apt 安装 postgresql 客户端。

有什么方法可以从 AWS Cloud Shell 连接 AWS RDS PostgreSQL 吗?就像在 GCP Cloud Shell 中一样?当我尝试从 GCP Cloud Shell 连接时,它允许我没有任何问题,但问题仍然存在于 AWS Cloud Shell 中。

感谢你的帮助。

【问题讨论】:

  • 您是否尝试按照错误所示刷新浏览器?此外,如果您的 postgres 在私有子网中,则 cloud shell 无法访问它。参考:aws.amazon.com/jp/cloudshell/faqs
  • 是的,我刷新了它。如果默认情况下不存在 psql 客户端,那么我正在寻找一种将其安装在云外壳上的方法

标签: postgresql amazon-web-services amazon-rds aws-cloudshell


【解决方案1】:

cloudshell运行在Amazon Linux 2上,它基于centos或者redhat enterprise linux。它不是基于 debian 的系统,因此您不会找到 apt 和朋友。

您可以尝试使用 yum 进行安装,但您可能最好使用亚马逊特定的工具:

sudo amazon-linux-extras install postgresql14

当前版本 11、12、13 和 14 可用

【讨论】:

    猜你喜欢
    • 2022-01-19
    • 2018-09-09
    • 2018-12-04
    • 2021-01-17
    • 2018-06-12
    • 2020-07-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多