菜鸟问题----apt-get: command not found错误

hong78 2011-10-15 05:10:14
root@ubuntu:/home/rin# apt-get install vim
Command 'apt-get' is available in '/usr/bin/apt-get'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
apt-get: command not found
不知道查来一下,说是权限问题,初步怀疑所使用来chmod 777 *命令的问题!求解答。
...全文
89675 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
simsunny22 2013-10-12
  • 打赏
  • 举报
回复
这个,怎么把apt-get: /usr/bin/apt-get这个加入到环境变量里面,有具体一点的么,谢了
oahz4699092zhao 2013-05-23
  • 打赏
  • 举报
回复 1
因为libevent 这个包是系统默认安装的,没有安装相应的开发所用的头文件。所以,还要使用如下命令来安装:yum install libevent-devel
Linux-Torvalds 2011-10-15
  • 打赏
  • 举报
回复
sudo apt-get install $packagename
freetstar 2011-10-15
  • 打赏
  • 举报
回复
路径问题,试试用sudo,不要直接用root
hong78 2011-10-15
  • 打赏
  • 举报
回复
root@ubuntu:/home/rin# cd /bin/
root@ubuntu:/bin# PATH="$PATH:/usr/bin"
root@ubuntu:/bin# export PATH
root@ubuntu:/bin# apt-get install vim
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
vim 已经是最新的版本了。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 169 个软件包未被升级。


.....可以来,嚯嚯嚯~~~谢谢~
子谋 2011-10-15
  • 打赏
  • 举报
回复
apt-get: /usr/bin/apt-get
看看你的环境变量PATH里有没有/usr/bin这个目录……
如果没有就加进去……
hong78 2011-10-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 esperantor 的回复:]

apt-get不在/usr/bin下

whereis apt-get
[/Quote]rin@ubuntu:~$ whereis apt-get
apt-get: /usr/bin/apt-get /usr/share/man/man8/apt-get.8.gz
曳尾之鱼 2011-10-15
  • 打赏
  • 举报
回复
apt-get不在/usr/bin下

whereis apt-get

23,210

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧