linux报错-bash: xhost: command not found
本帖转自倔强小梦https://www.cnblogs.com/xphdbky/p/8243008.html
倔强小梦参考自:http://blog.csdn.net/csdnones/article/details/51513163,感谢原作者解决了我的问题。
在root用户下执行xhost +,报以下错误,原因是因未没有安装相关的包(其他类似command not found命令没有可以用这种方式解决)
[root@rac01 ~]# xhost +
-bash: xhost: command not found
安装该包即可:
[root@rac01 ~]# yum whatprovides "*/xhost" ----------------------查看是哪些提供了 */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 ---------------------就是缺少这个包xorg-x11-server-utils-7.7-2.el6.x86_64
Repo : base
Matched from:
Filename : /usr/bin/xhost
安装xorg-x11-server-utils-7.7-2.el6.x86_64
[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!
安装完成,,再在root下执行xhost
[root@localhost database]# xhost +
xhost: unable to open display ":0.0"
xhost命令可以用啦啦。。
linux报错-bash: xhost: command not found的更多相关文章
- source /etc/profile报错-bash: id:command is not found
由于误操作导致 source /etc/profile 报错 -bash: id:command is not found 此时,linux下很多命令到不能能用,包括vi ls 等... 可以使用 e ...
- linux下报错bash: service: command not found
在linux下操作的时候经常会遇到,bash: service: command not found这个错误,以前在网上找了,照着弄了,也没细看原因,今天又碰到这个问题,就顺便研究一下. 1.通常这种 ...
- scp报错 -bash: scp: command not found
环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not fou ...
- scp命令报错-bash: scp: command not found
# scp -bash: scp: command not found # which scp /usr/bin/scp # rpm -qf /usr/bin/scp openssh-clients- ...
- scp拷贝文件报错-bash: scp: command not found
今天用scp远程传输资料,报错如下: -bash: scp: command not found 在网上搜资料解决办法如下: 安装scp的软件包: # yum install openssh-clie ...
- Mac 终端命令行报错 -bash: vi: command not found
我遇到的问题与这个类似,但是我的问题也是用该博文作者方法进行中断才解决的,在此表示感谢. 前段时间在 Mac 下使用终端遇到了这个问题: appledeMacBook-Air:~ air$ vi .b ...
- Mac 执行 gulp 报错 -bash: gulp: command not found
在mac系统下安装gulp,之后执行gulp 报如下错误: -bash: gulp: command not found 回溯安装过程发现问题如下 1.执行 npm root: Application ...
- Linux pip命令报错 -bash: pip: command not found
下载 $ wget https://bootstrap.pypa.io/get-pip.py 安装 $ python get-pip.py 查看版本 $ pip -V 查看安装路径: find / - ...
- linux 报错 bash ‘/bin/sh: Syntax error: “(” unexpected
今天用make 编译 蹦到 bash ‘/bin/sh: Syntax error: “(” unexpected 和 /bin/sh: [[: not found 这种莫名奇妙的错误 原因是是lin ...
随机推荐
- vscode 插件 与 技巧
lit-html 下载量:3 万 在 JavaScript/TypeScript 的文件中,如果有使用到 HTML 标记,lit-html 提供语法高亮和相应的补全支持. Git History 下载 ...
- git 命令详细
git是代码管理工具 github是基于git实现的代码管理平台 git --version 查看git版本 git remote -v 查看clone地址 git init 初始化git //全局设 ...
- iTOP-4412/4418/6818开发板-fastboot烧写脚本
在 iTOP-4412,4418,6818 开发板烧写的时候,使用的是 fastboot 工具. fastboot 工具需要在 cmd.exe 中调用,每次都需要输入烧写命令,这样步骤有点多.在程序员 ...
- pythonのdjango 信号
一.内置信号 Django中提供了“信号调度”,用于在框架执行操作时解耦.通俗来讲,就是一些动作发生的时候,信号允许特定的发送者去提醒一些接受者. Model signals pre_init # d ...
- 论文翻译:BinaryNet: Training Deep Neural Networks with Weights and Activations Constrained to +1 or −1
目录 摘要 引言 1.BinaryNet 符号函数 梯度计算和累积 通过离散化传播梯度 一些有用的成分 算法1 使用BinaryNet训练DNN 算法2 批量标准化转换(Ioffe和Szegedy,2 ...
- P5300 [GXOI/GZOI2019]与或和
题目地址:P5300 [GXOI/GZOI2019]与或和 考虑按位计算贡献 对于 AND 运算,只有全 \(1\) 子矩阵才会有贡献 对于 OR 运算,所以非全 \(0\) 子矩阵均有贡献 如果求一 ...
- Triplet Loss(转)
参考:https://blog.csdn.net/u013082989/article/details/83537370 作用:用于对差异较小的类别进行区分
- JUC--闭锁 CountDownLatch
CountDownLatch是一个同步辅助类,在完成一组正在其他线程中执行的操作之前,允许一个或者多个线程一直等待. 闭锁可以延迟线程的进度直到其到达终止状态,可以确保某些活动知道其他活动都完成才继续 ...
- symfony composer安装
参考 http://www.symfonychina.com/doc/current/setup.html 用Composer创建Symfony程序 ¶ 若你已安装过Composer,执行create ...
- Razor Page 文件
Razor Pages 所有的Razor文件都以 .cshtml 结尾.大部分Razor文件都是可浏览的,包含客户端代码和服务器端代码的混合,处理后会将HTML发送到浏览器.这些页面通常被称为“内容页 ...