即使已经安装,也找不到命令 wget

即使已经安装,也找不到命令 wget

我已经安装了 wget(版本 1.17.1),但是当我尝试使用它时显示:

No command '​wget' found, did you mean:
 Command 'wget' from package 'wget' (main)
 Command 'owget' from package 'ow-shell' (universe)
 Command 'pwget' from package 'pwget' (universe)
wget: command not found

我很确定我在这里遗漏了一些愚蠢的东西,但我无法弄清楚。帮忙吗?

编辑:结果

 echo $PATH, type -a wget and stat /usr/bin/wget

是:

/home/danielgreenfeld/bin:/home/danielgreenfeld/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

wget is /usr/bin/wget

File: '/usr/bin/wget'
Size: 474656        Blocks: 928        IO Block: 4096   regular file
Device: 808h/2056d  Inode: 6160959     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-11-01 16:38:14.860447561 +0200
Modify: 2016-06-14 11:18:09.000000000 +0300
Change: 2016-11-01 16:14:17.066538291 +0200
Birth:

ldd /usr/bin/wget:
    linux-vdso.so.1 =>  (0x00007ffd4ff9f000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f53fcbfd000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f53fc9f8000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f53fc78e000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f53fc34a000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f53fc130000)
libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007f53fbefc000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f53fbb33000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f53fb916000)
/lib64/ld-linux-x86-64.so.2 (0x0000556638a4a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f53fb711000)

file -k /usr/bin/wget:
/usr/bin/wget: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=34ad9f7e15210c48a07d185041d965f5681b8764, stripped\012- data

getfacl /usr/bin/wget:
getfacl: Removing leading '/' from absolute path names
# file: usr/bin/wget
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

答案1

wget 通常安装在 /usr/bin 中,因此请尝试完整路径:

/usr/bin/wget

如果没有安装,我假设你进行了自定义安装,而不是

apt-get install wget

如果它在那里,那么你的路径中可能缺少 /usr/bin:

echo $PATH

所以你必须添加它。

相关内容