在我的VPS找不到apt-get?

今天,我从http://www.frontrangehosting.com购买了Ubuntu 12.04 VPS,但是当我通过SSH访问它时,我无法使用apt-get。

[root@vps /]# apt-get install python-software-properties -bash: apt-get: command not found 

编辑:出于某种原因,它不能findLSB释放

 [root@vps /]# cat /etc/lsb-release cat: /etc/lsb-release: No such file or directory 

在你的shell提示符下,看起来你有CentOS或者其他一些Red Hat派生的发行版,而不是你期望的Ubuntu。

您可以通过运行确认:

 cat /etc/*-release 

并检查输出。

当你login你应该运行:

 cat /etc/issue 

这是否显示操作系统? 如果没有,我会放下邮件到您的提供商支持地址 – 这是可能的,他们只是给你错误的分配。

您可能需要尝试运行lsb_release命令,因为这是标准中定义的命令,而不是其信息的保存位置。

“lsb_release -a”应该给你比你想要的系统更多的信息。 在我的专用服务器上,我得到这个:

 No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.1 LTS Release: 12.04 Codename: precise 

我在Ubuntu(版本8.04到12.04)和Redhat ES / AS 4-6上都使用这个命令。