"Linux error"-bash:xhost:command not found

Source: Internet
Author: User
Tags postgresql


Reference from: http://blog.csdn.net/csdnones/article/details/51513163, thank the original author for solving my problem.


Execute Xhost + to report the following error because no related packages have been installed (other command not found commands can be resolved in this manner)



[Email protected] ~]# Xhost +
-bash:xhost:command not found


To install the package:


[Email protected] ~]# yum whatprovides "*/xhost"
Loaded Plugins:product-id, Security, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the 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



[Email protected] ~]#yum-y Install xorg-x11-server-utils-7.7-2.el6.x86_64
Loaded Plugins:product-id, Security, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the 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 'll 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 'll be installed
---> Package mcpp.x86_64 0:2.7.2-4.1.el6 'll 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 'll 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 K
Libmcpp x86_64 2.7.2-4.1.el6 Base K
Mcpp x86_64 2.7.2-4.1.el6 Base (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 error"-bash:xhost:command not found



Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.