简体   繁体   English

psql 崩溃:m1 Mac 上没有这样的文件或目录

[英]psql crash: No such file or directory on m1 Mac

在此处输入图像描述 I was coding and suddenly my mac froze, I couldn't really do much and I force shutdown my mac and after restarting my code won't run saying it can't connect to the database.我正在编码,突然我的 mac 卡住了,我真的做不了太多,我强行关闭了我的 mac,重新启动后我的代码无法运行,说它无法连接到数据库。 I checked if psql had any issue and this error message pops up.我检查了 psql 是否有任何问题,并弹出此错误消息。 "psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory. Is the server running locally and accepting connections on that socket?" “psql:错误:连接到套接字“/tmp/.s.PGSQL.5432”上的服务器失败:没有这样的文件或目录。服务器是否在本地运行并接受该套接字上的连接?” I tried everything to fix even trying to reinstall psql and nothing works.我尝试了所有修复方法,甚至尝试重新安装 psql,但没有任何效果。 I found a tutorial online saying to check the /usr/local/var/postgres and deleting ostmaster.pid.我在网上找到一个教程,说要检查 /usr/local/var/postgres 并删除 ostmaster.pid。 But I can't find that file anywhere.但我无法在任何地方找到该文件。 My /usr/local is also a bit different, I don't have these files var/postgres.我的 /usr/local 也有点不同,我没有这些文件 var/postgres。 I'm freaking out rn:'(我吓坏了rn:'(

Try checking the environment variables on your pc and check to see if psql is in the path.尝试检查您电脑上的环境变量并检查 psql 是否在路径中。 this make fix the issue这使解决问题

Nvm just fixed it, the file is under homebrew. Nvm 刚刚修复了它,该文件在自制软件下。 I deleted it and now everything works again!我删除了它,现在一切都恢复正常了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 `npm install` 在 node-gyp 重建时失败,`env: python: No such file or directory` on mac pro m1 - `npm install` fails on node-gyp rebuild with `env: python: No such file or directory` on mac pro m1 “gatsby develop”无法在 Mac M1 中运行 - "gatsby develop" cannot run in Mac M1 Xcode 13 mac m1 芯片谷歌登录构建为 iOS 模拟器提供构建,但链接为 iOS 构建的目标文件 - Xcode 13 mac m1 chip google signin build gives building for iOS Simulator,but linking in object file built for iOS 获取 M1 Mac 的真实架构,无论 Rosetta - Get real architecture of M1 Mac regardless of Rosetta MAC M1 安装“sharp”模块出现问题 - MAC M1 Something went wrong installing the "sharp" module 我无法安装 npm Mac m1 Monterey - I can't install npm Mac m1 Monterey Pod 安装失败 || 反应原生 || Mac M1 蒙特梭利 - Pod installation Failed || React native || Mac M1 Montesory 知道为什么 protractor 即使在授予 /usr/local/lib/node_modules 权限后也会安装在 mac m1 上的不同目录中 - Any idea why protractor is getting installed in a different directory on mac m1 even after giving permission to /usr/local/lib/node_modules Npm 在 nuxt.js 项目上运行开发无法在 Mac M1 上运行 - Npm run dev on nuxt.js project isn't working on Mac M1 Mac mini M1 npm 错误 npm ERR! 执行 npm ci 时代码 1 - Mac mini M1 npm error npm ERR! code 1 when perfoming npm ci
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM