gpt4 book ai didi

macos - 引导后运行的恶意 postgres 进程

转载 作者:行者123 更新时间:2023-11-29 14:21:35 24 4
gpt4 key购买 nike

在我用自制软件安装替换原来的 postgres 安装后,我遇到了 postgres 问题。

启动后,如果我发出 psql 命令,我会得到:

psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

如果我运行:

ps auxwww | grep postgres

我得到了这个奇怪的输出:

paulcowan 2829 0.0 0.0 2432784 540 s000 R+ 9:17am 0:00.00 grep postgres

如果我运行:

ps -ef | grep postgres

我得到:

501 2842 1040 0 9:19am ttys000 0:00.00 grep postgres

如果我然后运行:

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

一切开始。

我试图让 postgres 在登录时启动,我输入了这个命令:

 ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents

接着是:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

我收到这个错误:

launchctl: Couldn't stat("/Users/paulcowan/Library/LaunchAgents/homebrew.mxcl.postgresql.plist"): No such file or directory nothing found to load

最佳答案

您正在通过 grep 传输 ps 的输出,而 grep 正在寻找自己,因为 grep 的可见命令行包含正在搜索的字符串。一点也不奇怪。

没有流氓 PostgreSQL 进程。

关于macos - 引导后运行的恶意 postgres 进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23865825/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com