数据库丢失?自制软件安装和卸载

时间:2015-07-10 20:50:37

标签: ruby-on-rails database postgresql homebrew psql

好的,所以我做了一些非常错误但我不确定如何解决它。我在osx yosemite上,并且对rails很新。

下面是我输入终端的命令

**Anna$ 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"?**
Anna$ postgres -D /usr/local/var/postgres
   LOG:  database system was shut down at 2015-07-10 15:24:50 EDT
   LOG:  MultiXact member wraparound protections are now enabled
   LOG:  database system is ready to accept connections
   LOG:  autovacuum launcher started
   ^CLOG:  received fast shutdown request
   LOG:  aborting any active transactions
   LOG:  autovacuum launcher shutting down
   LOG:  shutting down
   LOG:  database system is shut down
Anna$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
   /Users/Anna/Library/LaunchAgents/homebrew.mxcl.postgresql.plist: No such file or directory
Anna$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
   /Users/Anna/Library/LaunchAgents/homebrew.mxcl.postgresql.plist: No such file or directory
Anna$ ln -sfv /usr/local/opt/postgresql/*.plist 
  ./homebrew.mxcl.postgresql.plist -> /usr/local/opt/postgresql/homebrew.mxcl.postgresql.plist
Anna$ ~/Library/LaunchAgents
  -bash: /Users/Anna/Library/LaunchAgents: is a directory
Anna$ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
   /Users/Anna/Library/LaunchAgents/homebrew.mxcl.postgresql.plist -> /usr/local/opt/postgresql/homebrew.mxcl.postgresql.plist
Anna$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
**Anna$ psql**
  **psql: FATAL:  database "Anna" does not exist**

然后我卸载了自制程序,但每次我尝试重新安装它时都会得到这个:

Anna$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  -bash: /Users/Anna/.rbenv/shims/ruby: No such file or directory

这是我用来安装它的第一个命令(直接工作)

任何帮助解决这个问题并告诉我我做错了所以我不再这样做真的很感激

0 个答案:

没有答案