目前共有9篇帖子。 内容转换:不转换▼
 
点击 回复
1247 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)
 

本帖信息

点击数:1247 回复数:8
评论数: ?
作者:巨大八爪鱼
最后回复:巨大八爪鱼
最后回复时间:2015-6-22 19:37
精品区:常见系统问题
 
©2010-2024 Arslanbar Ver2.0
除非另有声明,本站采用知识共享署名-相同方式共享 3.0 Unported许可协议进行许可。