freeb 安装了wget 却不能使用?

fuyou001 2010-05-07 03:28:09
执行pkg_info,结果 如下
$ pkg_info
diablo-jdk-1.6.0.07.02 Java Development Kit 1.6.0_07.02
javavmwrapper-2.3.2 Wrapper script for various Java Virtual Machines
mget-1.4.2 Multithreaded commandline web-download manager
pkg-config-0.23_1 A utility to retrieve information about installed libraries
xextproto-7.0.5 XExt extension headers
xproto-7.0.15 X11 protocol headers
xtrans-1.2.3 Abstract network code for X


已经安装上了wget
执行 wget 却是下面的情况

$ wget www.baidu.com
wget: not found
$
我切换到wget安装的目录下执行也不行

另外:远程管理freebsd ,大家用什么软件
...全文
258 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
steptodream 2010-05-10
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 fuyou001 的回复:]

引用 7 楼 dongyuechushi 的回复:
FreeBSD 的 ports 中的软件
安装到 /usr/local 下
看看 /usr/local/bin 下有木有呢

/usr/local/bin PATH 变量呢?

pkg_info -l 看看安装到哪里了..

在这个/usr/local/bin 目录找到了
我要把这个加个path 里去,要什么命令加
[/Quote]
我问你/usr/local/bin里有wget这个可执行文件吗
如果有/usr/local/bin/wget xxx 看看能否运行
如果没有/usr/local/bin/wget这个可执行文件 就算你把/usr/local/bin加到PATH里 同样不好用
你前面
bsd# find / -name wget
/usr/ports/ftp/wget
这说明整个系统叫wget的就只是/usr/ports/ftp/wget 而/usr/ports/ftp/wget不是你的安装文件夹么?
所以说你根本没有安装成功 没有wget的可执行文件

添加PATH 如果用的是bash 如果对个人生效 修改~/.bash_profile
追加export PATH=$PATH:/usr/local/bin
然后source ~/.bash_profile
如果对所有人生效 在/etc/profile里追加
然后source /etc/profile
fuyou001 2010-05-10
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 dongyuechushi 的回复:]
FreeBSD 的 ports 中的软件
安装到 /usr/local 下
看看 /usr/local/bin 下有木有呢

/usr/local/bin PATH 变量呢?

pkg_info -l 看看安装到哪里了..
[/Quote]
在这个/usr/local/bin 目录找到了
我要把这个加个path 里去,要什么命令加
dongyuechushi 2010-05-09
  • 打赏
  • 举报
回复
FreeBSD 的 ports 中的软件
安装到 /usr/local 下
看看 /usr/local/bin 下有木有呢

/usr/local/bin PATH 变量呢?

pkg_info -l 看看安装到哪里了..
mymtom 2010-05-07
  • 打赏
  • 举报
回复
显然是没有安装wget嘛。


1. 图方便的话,直接用安装包进行安装
pkg_add -r wget

2. 喜欢折腾的,用ports 自己编译安装

cd /usr/ports/ftp/wget
make && make install && make clean
steptodream 2010-05-07
  • 打赏
  • 举报
回复
我怀疑你根本就没有安装成功

bsd# find / -name wget
/usr/ports/ftp/wget
之后找到的wget是一个文件夹而已 估计就是你的安装文件夹 你进wget文件夹里wget ww.baidu.com 而wget文件夹里根本就没有wget这个可执行文件 又如何能成功呢?

至于书嘛 我看的少 linux方面 鸟哥的linux私房菜 做为入门不错http://linux.vbird.org/
FreeBSD的话 就不知道看什么号了 你google一下吧
fuyou001 2010-05-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 steptodream 的回复:]
如果你确认wget安装成功了的话
直接执行wget不行的原因是 该命令所在的路径没有包含在环境变量PATH里
看看/bin /usr/bin /usr/local/bin等目录下是否有 如果没有就执行find / -name wget找找 看看在哪儿
很多软件安装之后 可执行文件并不是在你所谓的安装目录 你去那里 当然没有
没事了 多学习一下系统使用的基础
[/Quote]
有什么好网站或书推荐吗
fuyou001 2010-05-07
  • 打赏
  • 举报
回复
bsd# find / -name wget
/usr/ports/ftp/wget
bsd# cd /usr/ports/ftp/
bsd# cd wget
bsd# pwd
/usr/ports/ftp/wget
bsd# wget ww.baidu.com
wget: Command not found.

我想把命令设置到path里去,怎么设置
谢谢
fuyou001 2010-05-07
  • 打赏
  • 举报
回复
bsd# find / -name wget
/usr/ports/ftp/wget
bsd# cd /usr/ports/ftp/
bsd# cd wget
bsd# pwd
/usr/ports/ftp/wget
bsd# wget ww.baidu.com
wget: Command not found.

我想把命令设置到path里去,怎么设置
谢谢
steptodream 2010-05-07
  • 打赏
  • 举报
回复

如果你确认wget安装成功了的话
直接执行wget不行的原因是 该命令所在的路径没有包含在环境变量PATH里
看看/bin /usr/bin /usr/local/bin等目录下是否有 如果没有就执行find / -name wget找找 看看在哪儿
很多软件安装之后 可执行文件并不是在你所谓的安装目录 你去那里 当然没有
没事了 多学习一下系统使用的基础

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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