我最近安裝了 Ubuntu 20.04 LTS,並且我是 ubuntu 的新手。安裝 postgresql 14 後,我運行了sudo apt update
.然後它說
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'
已經測試 /etc/apt/sources.list.d/pgdg.list
更改為
# deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
到
# deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
但訊息仍然出現
答案1
文件是這樣的
deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
# deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
然後我改變了
deb [arch=amd64] https://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
# deb [arch=amd64] https://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
然後它起作用了。看來添加 [arch=amd64] 並在 https 中添加“s”很重要