[英]ERROR: could not open extension control file "/usr/pgsql-9.6/share/extension/postgis.control": No such file or directory
我想將我的項目部署到 VPS Centos7。 但是我在安裝 postgres 時遇到錯誤。 當我輸入
create extension postgis;
獲取錯誤
錯誤:無法打開擴展控制文件“/usr/pgsql-9.6/share/extension/postgis.control”:沒有那個文件或目錄
因為 postgis.contol 位於另一個地方,
find /usr -name postgis.control
/usr/share/pgsql/extension/postgis.control
但是 postgres 試圖從/usr/pgsql-9.6/share/extension/postgis.control
創建它
之前已經問過這個問題,但我的問題是其他問題。
對我來說,我在 Ubuntu 中運行以下命令,問題解決了。
sudo apt install postgresql-10-postgis-scripts
然后運行
CREATE EXTENSION postgis
它對我來說很好。我希望它有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.