大家好,我正在尝试在我的 ubuntu 20.04 上安装 postgresql 和 pgadmin...运行时出现此错误:
sudo apt-get update
错误:
N: Ignoring file 'pg' in directory '/etc/apt/sources.list.d/' as it has no filename extension
我尝试用这行代码来解决它:
deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
但它抛出了这个错误:
(gedit:17048): Tepl-WARNING **: 17:10:16.344: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.
现在我不知道还有什么其他方法可以解决这个问题。有什么帮助吗?
答案1
要在 Ubuntu 20.04 中使用 PostgreSQL Apt 存储库,请按照以下步骤操作:
创建文件
/etc/apt/sources.list.d/pgdg.list
并cd /etc/apt/sources.list.d/ && sudo touch pgdg.list
为存储库添加一行。sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
导入存储库签名密钥,并更新包列表。
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt update