作者共發了9篇帖子。 內容轉換:不轉換▼
 
點擊 回復
1231 8
[解決方案]Fedora21升級到Fedora22後,PostgreSQL無法啟動
一派護法 十九級
1樓 發表于:2015-6-22 19:32
癥狀:
[octopus@pc3 ~]$ sudo service postgresql start
Redirecting to /bin/systemctl start  postgresql.service
Job for postgresql.service failed. See "systemctl status postgresql.service" and "journalctl -xe" for details.
一派護法 十九級
2樓 發表于:2015-6-22 19:32
癥狀2:
[octopus@pc3 ~]$ psql
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
一派護法 十九級
3樓 發表于:2015-6-22 19:33
其實問題的根源是我今天在執行sudo dnf update時無意中發現的:
--------------------------------------------------------------------------------
Total                                           116 kB/s |  75 MB     10:58    
Delta RPMs reduced 258.5 MB of updates to 74.7 MB (71.1% saved)
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction check error:
  file /usr/share/doc/postgresql/README.rpm-dist conflicts between attempted installs of postgresql-9.4.4-1.fc22.i686 and postgresql-9.4.4-1.fc22.x86_64

Error Summary
-------------
這是因為出現了conflicts,系統中同時安裝了postgresql-9.4.4-1.fc22.i686 and postgresql-9.4.4-1.fc22.x86_64兩個版本而出錯。因此只需卸載其中一個版本即可。
一派護法 十九級
4樓 發表于:2015-6-22 19:34
[octopus@pc3 ~]$ sudo dnf remove postgresql-9.4.3-1.fc22.x86_64
Dependencies resolved.
================================================================================
 Package                  Arch         Version              Repository     Size
================================================================================
Removing:
 postgresql               x86_64       9.4.3-1.fc22         @System       3.8 M
 postgresql-devel         x86_64       9.4.3-1.fc22         @System       4.3 M
 postgresql-docs          x86_64       9.4.3-1.fc22         @System        23 M
 postgresql-server        x86_64       9.4.3-1.fc22         @System        17 M
 postgresql-upgrade       x86_64       9.4.3-1.fc22         @System       9.1 M

Transaction Summary
================================================================================
Remove  5 Packages

Installed size: 58 M
Is this ok [y/N]: n
Operation aborted.
一派護法 十九級
5樓 發表于:2015-6-22 19:34
[octopus@pc3 ~]$ sudo dnf remove postgresql-9.4.3-1.fc22.i686
Dependencies resolved.
================================================================================
 Package             Arch          Version               Repository        Size
================================================================================
Removing:
 postgresql          i686          9.4.3-1.fc22          @System          3.7 M

Transaction Summary
================================================================================
Remove  1 Package

Installed size: 3.7 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Erasing     : postgresql-9.4.3-1.fc22.i686                                1/1
  Verifying   : postgresql-9.4.3-1.fc22.i686                                1/1

Removed:
  postgresql.i686 9.4.3-1.fc22                                                  

Complete!
一派護法 十九級
6樓 發表于:2015-6-22 19:35
因為卸載postgresql-9.4.3-1.fc22.i686時只卸載一樣東西,而卸載postgresql-9.4.3-1.fc22.x86_64需要卸載所有的有關psql的東西。所以只卸載i686那個不完整版本。執行:
sudo dnf remove postgresql-9.4.3-1.fc22.i686
一派護法 十九級
7樓 發表于:2015-6-22 19:36
然後升級數據庫:
[octopus@pc3 ~]$ sudo postgresql-setup --upgrade
 * Upgrading database.
 * Upgraded OK.
WARNING: The configuration files were replaced by default configuration.
WARNING: The previous configuration and data are stored in folder
WARNING: /var/lib/pgsql/data-old.
 * See /var/lib/pgsql/upgrade_postgresql.log for details.
一派護法 十九級
8樓 發表于:2015-6-22 19:36
[octopus@pc3 ~]$ sudo service postgresql start
Redirecting to /bin/systemctl start  postgresql.service
啟動成功!問題已解決
一派護法 十九級
9樓 發表于:2015-6-22 19:37
配置文件已經被覆蓋。所以需要重新改配置文件。

回復帖子

內容:
用戶名: 您目前是匿名發表
驗證碼:
(快捷鍵:Ctrl+Enter)
 

本帖信息

點擊數:1231 回複數:8
評論數: ?
作者:巨大八爪鱼
最後回復:巨大八爪鱼
最後回復時間:2015-6-22 19:37
精品區:常見系統問題
 
©2010-2024 Arslanbar Ver2.0
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。