参考自: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!

-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. 【linux报错】-bash: xhost: command not found

    参考自:http://blog.csdn.net/csdnones/article/details/51513163,感谢原作者解决了我的问题. 执行xhost +,报以下错误,原因是因未没有安装相关 ...

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

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

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

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

  5. -bash: .bash_profile: command not found

    今天有一同事安装了ORACLE后,在切换账号时遇到错误提示"-bash: .bash_profile: command not found".如下所示 [root@GLETestL ...

  6. Linux下提示 bash: xxx command not found

    今天在虚拟机上安装了CentOS5.5,发现运行一些很正常的诸如:init,shutdown,fdisk 等命令时,悍然提示: bash: xxx command not found. 那么,首先就要 ...

  7. [原创]-bash: iostat: command not found解决办法

    [root@testhost ~]# iostat-bash: iostat: command not found IOSTAT 命令不可用,首先确认sysstat包是否安装,sysstat包中包括i ...

  8. # mysql -u root -p -bash: mysql: command not found

    [root@jboss ~]# mysql -u root -p-bash: mysql: command not found 需要安装mysql # yum install mysql之后就行 了

  9. bash:fdisk:command not found

    bash:fdisk:command not found [lansir@Red-Hat ~]$ fdisk -l-bash: fdisk: command not found 原因是fdisk不在P ...

随机推荐

  1. ALINX公众号

    请大家加一下ALINX公众号,后续FPGA资料更新,活动信息,新产品发布将通过微信公众号进行第一时间通知.

  2. tensorflow 在windows下的安装

    anaconda3 python3.5 tensorflow 在 windows下的安装 1.安装Anaconda 清华的镜像:https://mirrors.tuna.tsinghua.edu.cn ...

  3. 11.8Django中的组件content_type

    2018-11-8 18:59:11 在Django中已经有一个contenttype这个组件,并且在python manage.py makemigrations 和migrate的时候,一起在数据 ...

  4. Retrofit2 项目配置

    在项目的 app  build.gradle 文件中加入 dependencies { // Retrofit2implementation 'com.squareup.retrofit2:retro ...

  5. 类似于Mimikatz的Linux Hash Dump工具

    项目主页 https://github.com/huntergregal/mimipenguin 需要root权限 支持 Kali 4.3.0 (rolling) x64 (gdm3) Ubuntu ...

  6. 1、js基础内容

    js基础内容 1. 编辑器 编译环境 浏览器 编辑软件 sublime DW H5Build Atom ==[注]尽可能多的去使用编辑器去编辑代码.== Html+css ==JS 逻辑== 比作建设 ...

  7. git最佳实践之feature和hotfix分支

    先来复习一波,git的最佳分支管理流程: 再简单复习各个分支: master: 主分支,主要用来版本发布. develop:日常开发分支,该分支正常保存了开发的最新代码. feature:具体的功能开 ...

  8. 树莓派3 之 pi3Robot 控制系统配置

    需求 个人正在用Python写一个控制系统,技术选型是python3 + Flask + Mysql + Bootstrap.需要将这套系统直接部署到树莓派中. 代码地址:https://github ...

  9. SQL[Err] ORA-00933: SQL command not properly ended

    原文链接:https://www.cnblogs.com/godtrue/p/3784526.html 1:可能SQL语句中关键字前后缺少空格 2:Oracle 给表起别名时,直接在表名的后面空格别名 ...

  10. windows 控制台下运行cl命令

    前提:确保已经安装vc6或者vs系列 我们可以再命令行直接编译c++程序, 在windows操作系统中,打开命令行,输入cl,若系统提示:'cl' 不是内部或外部命令,也不是可运行的程序或批处理文件. ...