使用 psql 在 mac os 系统上登录,系统显示没有 psql 这个命令存在

解决方法如下:

将 postgresql 的 bin 目录添加到环境变量中即可

export PATH="/Applications/Postgres.app/Contents/Versions/9.5/bin:$PATH"

参考链接:

https://stackoverflow.com/questions/20928734/how-to-put-psql-on-the-path-when-using-postgres-app-on-os-x?rq=1

Mac OS -bash: psql: command not found 使用 psql 命令报错的更多相关文章

  1. RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found

    RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found 在多台Linux服务器SSH相互访问无需密码, 其中进入一台Linus中,对其 ...

  2. mac上执行sed的编辑 -i命令报错sed: 1: "test.txt": undefined label ‘est.txt’或sed: 1: "2a\test\": extra characters after \ at the end of a command

    问题一 sed编辑命令:[sed -i 's/a/b/g' test.txt]   报错:sed: 1: "test.txt": undefined label 'est.txt' ...

  3. scp命令报错-bash: scp: command not found

    # scp -bash: scp: command not found # which scp /usr/bin/scp # rpm -qf /usr/bin/scp openssh-clients- ...

  4. Mac 升级后idea执行git命令报错xcrun: error: invalid active developer path的解决办法

    报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun ...

  5. Mac安装Mysql-python遇到的坑,被这俩报错反复摩擦:'my_config.h' file not found 和 IndexError: string index out of range

    最后Stackoverflow上面的大神解决了问题: Link brew install mysql brew unlink mysql brew install mysql-connector-c ...

  6. (3)mac下"-bash: mysql: command not found"解决方案

    针对 mysql: command not found 输入命令 $ ln -s /usr/local/mysql/bin/mysql /usr/bin 假如你人品不好,被打脸了,提示你权限不够: l ...

  7. Mac OS X中开启或关闭显示隐藏文件命令

    前言:之前一直用的都是 windows 系统的电脑,刚接触 Mac ,很多功能都不熟悉,写下博客记录一下,以防以后忘记,也给后来者提供方便. 命令行方式:显示隐藏文件: defaults write ...

  8. 解决mac os下mcss命令报错:env: node\r: No such file or directory

    标题无“转载”即原创文章,版权所有.转载请注明来源:http://besteam.im/blogs/article/31/. 我一直对字符界面有抵触感,即使会用vim,我的linux脚本(python ...

  9. react-native在mac上执行gradlew命令报错 ./gradlew: command not found

    这是因为react-native项目是windows上初始化,通过git clone到mac机器上后gradlew这个文件没有可执行权限,如图: 所以只需要给gradlew这个文件增加可执行权限就可以 ...

随机推荐

  1. pip---cannot import name main解决方案

    .先来看下Python不同版本对应的路径 which python3. which python3. .使用update-alternatives --install建立链接 sudo update- ...

  2. markdown里面编辑代码

    转:http://c.biancheng.net/view/6623.html ------------------------------------------------------------ ...

  3. GITHUB下载ANDRIOD源码

    1 git clone https://android.googlesource.com/device/common.git 2 git clone https://android.googlesou ...

  4. [Flutter] Router Navigation

    Basic navigation by using 'Navigator.push' & 'Navigator.pop()', for example, we have two screen, ...

  5. CocoaPods加载第三方库

    http://code4app.com/article/cocoapods-install-usage

  6. javaweb学习笔记(二)

    一.javaweb学习是所需要的细节 1.Cookie的注意点 ① Cookie一旦创建,它的名称就不能更改,Cookie的值可以为任意值,创建后允许被修改. ② 关于Cookie中的setMaxAg ...

  7. Linux 一条长命令占用多行

    前言 考察下面的脚本: ? 1 emcc -o ./dist/test.html --shell-file ./tmp.html --source-map-base dist -O3 -g4 --so ...

  8. 查看java的jar包源码

    1.jd-gui (windows环境) 下载地址 https://files.cnblogs.com/files/indifferent/jd-gui-windows-1.5.1.zip 下载并解压 ...

  9. C void的指针 强制类型转换(int*)p 把变量指针p强制转换成指向int类型的指针

    #include <stdio.h> int main(void){ void *p; int a = 14322; char c ='A'; p = &a; //p = & ...

  10. 猴猴的比赛 dfs序

    猴猴的比赛 dfs序 两颗\(n\)节点的树,不相同,问多少点对\((u,v)\)在两棵树上均满足路径\(v\)在\(u\)子树中 \(n\le 10^5\) 暴力: \(n^2\)暴力枚举点对用\( ...