参考自:http://blog.csdn.net/csdnones/article/details/51513163,感谢原作者解决了我的问题。

执行xhost +,报以下错误,原因是因未没有安装相关的包(其他类似command not found命令没有可以用这种方式解决)

[root@rac01 ~]# xhost +
-bash: xhost: command not found

安装该包即可:

[root@rac01 ~]# yum whatprovides "*/xhost"
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
base/filelists_db                                                               | 3.4 MB     00:00 ...
xorg-x11-server-utils-7.7-2.el6.x86_64 : X.Org X11 X server utilities
Repo        : base
Matched from:
Filename    : /usr/bin/xhost

[root@rac01 ~]# yum -y install xorg-x11-server-utils-7.7-2.el6.x86_64
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-server-utils.x86_64 0:7.7-2.el6 will be installed
--> Processing Dependency: mcpp for package: xorg-x11-server-utils-7.7-2.el6.x86_64
--> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-server-utils-7.7-2.el6.x86_64
--> Running transaction check
---> Package libXxf86misc.x86_64 0:1.0.3-4.el6 will be installed
---> Package mcpp.x86_64 0:2.7.2-4.1.el6 will be installed
--> Processing Dependency: libmcpp.so.0()(64bit) for package: mcpp-2.7.2-4.1.el6.x86_64
--> Running transaction check
---> Package libmcpp.x86_64 0:2.7.2-4.1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                           Arch               Version                   Repository        Size
=======================================================================================================
Installing:
 xorg-x11-server-utils             x86_64             7.7-2.el6                 base             155 k
Installing for dependencies:
 libXxf86misc                      x86_64             1.0.3-4.el6               base              18 k
 libmcpp                           x86_64             2.7.2-4.1.el6             base              69 k
 mcpp                              x86_64             2.7.2-4.1.el6             base              23 k

Transaction Summary
=======================================================================================================
Install       4 Package(s)

Total download size: 265 k
Installed size: 570 k
Downloading Packages:
-------------------------------------------------------------------------------------------------------
Total                                                                  2.2 MB/s | 265 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libXxf86misc-1.0.3-4.el6.x86_64                                                     1/4
  Installing : libmcpp-2.7.2-4.1.el6.x86_64                                                        2/4
  Installing : mcpp-2.7.2-4.1.el6.x86_64                                                           3/4
  Installing : xorg-x11-server-utils-7.7-2.el6.x86_64                                              4/4
  Verifying  : libmcpp-2.7.2-4.1.el6.x86_64                                                        1/4
  Verifying  : xorg-x11-server-utils-7.7-2.el6.x86_64                                              2/4
  Verifying  : libXxf86misc-1.0.3-4.el6.x86_64                                                     3/4
  Verifying  : mcpp-2.7.2-4.1.el6.x86_64                                                           4/4

Installed:
  xorg-x11-server-utils.x86_64 0:7.7-2.el6

Dependency Installed:
  libXxf86misc.x86_64 0:1.0.3-4.el6    libmcpp.x86_64 0:2.7.2-4.1.el6    mcpp.x86_64 0:2.7.2-4.1.el6

Complete!

【linux报错】-bash: xhost: command not found的更多相关文章

  1. linux报错-bash: xhost: command not found

    本帖转自倔强小梦https://www.cnblogs.com/xphdbky/p/8243008.html 倔强小梦参考自:http://blog.csdn.net/csdnones/article ...

  2. source /etc/profile报错-bash: id:command is not found

    由于误操作导致 source /etc/profile 报错 -bash: id:command is not found 此时,linux下很多命令到不能能用,包括vi ls 等... 可以使用 e ...

  3. linux下报错bash: service: command not found

    在linux下操作的时候经常会遇到,bash: service: command not found这个错误,以前在网上找了,照着弄了,也没细看原因,今天又碰到这个问题,就顺便研究一下. 1.通常这种 ...

  4. scp报错 -bash: scp: command not found

    环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not fou ...

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

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

  6. scp拷贝文件报错-bash: scp: command not found

    今天用scp远程传输资料,报错如下: -bash: scp: command not found 在网上搜资料解决办法如下: 安装scp的软件包: # yum install openssh-clie ...

  7. Mac 终端命令行报错 -bash: vi: command not found

    我遇到的问题与这个类似,但是我的问题也是用该博文作者方法进行中断才解决的,在此表示感谢. 前段时间在 Mac 下使用终端遇到了这个问题: appledeMacBook-Air:~ air$ vi .b ...

  8. Mac 执行 gulp 报错 -bash: gulp: command not found

    在mac系统下安装gulp,之后执行gulp 报如下错误: -bash: gulp: command not found 回溯安装过程发现问题如下 1.执行 npm root: Application ...

  9. Linux pip命令报错 -bash: pip: command not found

    下载 $ wget https://bootstrap.pypa.io/get-pip.py 安装 $ python get-pip.py 查看版本 $ pip -V 查看安装路径: find / - ...

  10. linux 报错 bash ‘/bin/sh: Syntax error: “(” unexpected

    今天用make 编译 蹦到 bash ‘/bin/sh: Syntax error: “(” unexpected 和 /bin/sh: [[: not found 这种莫名奇妙的错误 原因是是lin ...

随机推荐

  1. HTTPS科普扫盲

    为什么需要HTTPS HTTP是明文传输的,也就意味着,介于发送端.接收端中间的任意节点都可以知道你们传输的内容是什么.这些节点可能是路由器.代理等. 举个最常见的例子,用户登陆.用户输入账号,密码, ...

  2. 【PHP】mysql_insert_id() 函数

    mysql_insert_id() 函数返回上一步 INSERT 操作产生的 ID. 如果上一查询没有产生 AUTO_INCREMENT 的 ID,则 mysql_insert_id() 返回 0. ...

  3. EF直接的一對多多對多多對一的關係----也即是鏈錶查詢

    基于EF4.1 code first 简单的CRUD  园子中已经有很多了 ~~ 真不想再写这个了 可是为了做一个完整的小demo 从开始 到后面的一些简单重构 还是决定认真把这个写出来 争取写些别人 ...

  4. unittest 测试

    unittest 测试 单元测试是用来对一个模块.一个函数或者一个类来进行正确性检验的测试工作. 比如对函数abs(),我们可以编写出以下几个测试用例: 输入正数,比如1.1.2.0.99,期待返回值 ...

  5. wepy build 错误 [Error] 未发现相关 less 编译器配置,请检查wepy.config.js文件。

    [Error] 未发现相关 less 编译器配置,请检查wepy.config.js文件. 缺少less包,npm install less -d

  6. linux的虚拟文件系统VFS

    虚拟文件系统(virtual file system),别名虚拟文件系统开关,是linux中的一个软件层,向用户空间提供文件系统操作接口. VFS包含的系统调用包括open(2).stat(2).re ...

  7. JS知识点整理(一)

    前言 本文把平时的一些读书笔记和理解进行了整理归纳,包含一些易混淆.遗漏的知识点,也会配上一些例子,可能不是很完整,还会有点杂,但也许会有你需要的(目前先整理了一部分,笔记有点多,后续会持续更新). ...

  8. CUBE,ROLLUP 和 GROUPING

    1.用 CUBE 汇总数据 CUBE 运算符生成的结果集是多维数据集.多维数据集是事实数据的扩展,事实数据即记录个别事件的数据.扩展建立在用户打算分析的列上.这些列被称为维.多维数据集是一个结果集,其 ...

  9. iOS audio不支持循环播放

    解决办法:监听播放完成事件(注意点,audio标签不能设置循环播放,去除标签 loop="loop"或者 loop="false",不然不走播放完成事件) $( ...

  10. python新建一个表格xls并写入数据

    # -*- coding:utf-8 -*- import xlwt workbook = xlwt.Workbook() # 新建一个工作簿 sheet = workbook.add_sheet(& ...