Lan*_*see 6 postgresql macos homebrew
我刚买了一台新的 Macbook Pro M1,并一直在尝试使用自制软件安装 Postgres。在尝试了一系列不同的方法(从安装不同版本的 Postgres 到尝试)后,rm /usr/local/var/postgres/postmaster.pid
我没有运气。我现在甚至无法在没有错误消息的情况下成功安装 Postgres。当我卸载然后重新安装时,brew install postgres
我得到:
\xe2\x9e\x9c ~ brew install postgres\n==> Downloading https://ghcr.io/v2/homebrew/core/postgresql/manifests/14.1_1\nAlready downloaded: /Users/landonlapensee/Library/Caches/Homebrew/downloads/34e850b9c47867f84334b48fe844f7a171369d777b5c118a4119297f7c215147--postgresql-14.1_1.bottle_manifest.json\n==> Downloading https://ghcr.io/v2/homebrew/core/postgresql/blobs/sha256:027c8b48406c3d732241426e0f5d2caf9f48cb4d2d38610b8f5d46f0adf7a89f\nAlready downloaded: /Users/landonlapensee/Library/Caches/Homebrew/downloads/b74d7a88df70e29d3cd5714896c2dd5b16a1e8c01188164026a4b5762f18234b--postgresql--14.1_1.monterey.bottle.tar.gz\n==> Pouring postgresql--14.1_1.monterey.bottle.tar.gz\n==> /usr/local/Cellar/postgresql/14.1_1/bin/initdb --locale=C -E UTF-8 /usr/local/var/postgres\nLast 15 lines from /Users/landonlapensee/Library/Logs/Homebrew/postgresql/post_install.01.initdb:\nData page checksums are disabled.\n\nfixing permissions on existing directory /usr/local/var/postgres ... ok\ncreating subdirectories ... ok\nselecting dynamic shared memory implementation ... posix\nselecting default max_connections ... 20\nselecting default shared_buffers ... 400kB\nselecting default time zone ... America/Vancouver\ncreating configuration files ... ok\nrunning bootstrap script ... 2021-12-07 10:07:39.032 PST [52558] FATAL: could not create shared memory segment: Cannot allocate memory\n2021-12-07 10:07:39.032 PST [52558] DETAIL: Failed system call was shmget(key=1895806, size=56, 03600).\n2021-12-07 10:07:39.032 PST [52558] HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMALL parameter. You might need to reconfigure the kernel with larger SHMALL.\n The PostgreSQL documentation contains more information about shared memory configuration.\nchild process exited with exit code 1\ninitdb: removing contents of data directory "/usr/local/var/postgres"\nWarning: The post-install step did not complete successfully\nYou can try again using:\n brew postinstall postgresql\n==> Caveats\nTo migrate existing data from a previous major version of PostgreSQL run:\n brew postgresql-upgrade-database\n\nThis formula has created a default database cluster with:\n initdb --locale=C -E UTF-8 /usr/local/var/postgres\nFor more details, read:\n https://www.postgresql.org/docs/14/app-initdb.html\n\nTo restart postgresql after an upgrade:\n brew services restart postgresql\nOr, if you don't want/need a background service you can just run:\n /usr/local/opt/postgresql/bin/postgres -D /usr/local/var/postgres\n==> Summary\n /usr/local/Cellar/postgresql/14.1_1: 3,304 files, 43.9MB\n==> Running `brew cleanup postgresql`...\nDisable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.\nHide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).\n
Run Code Online (Sandbox Code Playgroud)\n然后如果我运行brew services start postgres
我会得到:
\xe2\x9e\x9c ~ brew services start postgres\nBootstrap failed: 5: Input/output error\nTry re-running the command as root for richer errors.\nError: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/landonlapensee/Library/LaunchAgents/homebrew.mxcl.postgresql.plist` exited with 5\n
Run Code Online (Sandbox Code Playgroud)\n如果我运行psql
我会得到:
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/landonlapensee/Library/LaunchAgents/homebrew.mxcl.postgresql.plist` exited with 5.\n\xe2\x9e\x9c ~ psql\npsql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory\n Is the server running locally and accepting connections on that socket?\n
Run Code Online (Sandbox Code Playgroud)\n如果我运行 \xe2\x9e\x9c ~ rm /usr/local/var/postgres/postmaster.pid
我得到:
rm: /usr/local/var/postgres/postmaster.pid: No such file or directory\n
Run Code Online (Sandbox Code Playgroud)\n我在这个问题上很迷茫。我正在尝试将其设置为用于 ruby on Rails 环境。有谁知道可能导致此问题的原因是什么?(我尝试了很多不同的线程/命令,我认为我创建了导致冲突的根文件)
\n或者有人有任何付费服务的建议可以帮助我解决这个问题吗?
\n十分感谢!
\n 归档时间: |
|
查看次数: |
4043 次 |
最近记录: |