Solve the problem that Ubuntu9.10 cannot be started after PostgreSQL8.4 is installed.

Source: Internet
Author: User
Today, I want to learn how to install PostgreSQL8.4 in Ubuntu9.10. After executing the following command, linuxidc @ pentest :~ $ The sudoapt-getinstallpostgresql-8.4postgresql-client-8.4postgresql-contrib-8.4 returns the following: update-alternatives: Using/usr/share/postgresql

I want to install PostgreSQL 9.10 on Ubuntu 8.4 today. After executing the following command

Linuxidc @ pentest :~ $ Sudo apt-get install postgresql-8.4 postgresql-client-8.4 postgresql-contrib-8.4

The returned result is as follows:

Update-alternatives:/usr/share/postgresql/8.4/man/man1/postmaster.1.gz is used to provide/usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in automatic mode.
* Starting PostgreSQL 8.4 database server * The PostgreSQL server failed to start. Please check the log output:
00:03:24 cst fatal: cocould not create shared memory segment :?????
00:03:24 cst detail: Failed system call was shmget (key = 5433001, size = 36880384,036 00 ).
2010-01-25 00:03:24 cst hint: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. you can either reduce the request size or reconfigure the kernel with larger SHMMAX. to reduce the request size (currently 36880384 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 103 ).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or recycling SHMMIN is called.
The PostgreSQL documentation contains more information about shared memory configuration.
[Fail]
Invoke-rc.d: initscript postgresql-8.4, action "start" failed.
Dpkg: Error Handling postgresql-8.4 (-configure:
The post-installation script installed by the sub-process Returns Error 1.
Dpkg: dependency issues make the configuration of the postgresql-contrib-8.4 unable to continue:
The postgresql-contrib-8.4 depends on the postgresql-8.4; however:
The package postgresql-8.4 has not been configured.
Dpkg: Error Handling postgresql-contrib-8.4 (-configure:
Dependency problem-Not Configured
No apport report is written, because the error message indicates that it is caused by the previous failure.
An error occurred during processing:
Postgresql-8.4
Postgresql-contrib-8.4
E: Sub-process/usr/bin/dpkg returned an error code (1)

The solution is simple:

Linuxidc @ pentest :~ $ Sudo sysctl-w kernel. shmmax = 2147483648
Kernel. shmmax = 2147483648
Linuxidc @ pentest :~ $ Sysctl-a | grep shmmax
Error: permission denied on key 'kernel. cad_pid'
Kernel. shmmax = 2147483648
Error: permission denied on key 'fs. binfmt_misc.register'
Error: permission denied on key 'Net. Route 4.route. flush'
Error: permission denied on key 'Net. Route 6.route. flush'
Linuxidc @ pentest :~ $ Sudo/etc/init. d/postgresql-8.4 start
* Starting PostgreSQL 8.4 database server [OK]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.