问题描述:

wget not working on my debian server from now:

wget http://anydomain.hu/anyimage.png

/usr/local/bin/wget: 3: /usr/local/bin/wget: Cannot fork

running "top" command:

Tasks: 89 total, 1 running, 88 sleeping, 0 stopped, 0 zombie

%Cpu(s): 1,0 us, 0,0 sy, 0,0 ni, 99,0 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st

KiB Mem: 1017080 total, 64316 used, 952764 free, 2264 buffers

KiB Swap: 1675260 total, 42488 used, 1632772 free, 22564 cached

i don't know what's the problem pls help me

网友答案:

Have you tried to reinstall wget? If not try apt-get install --reinstall wget and try again to download anything.

网友答案:

The wget command is normally in /usr/bin. Since yours is in /usr/local/bin, it appears you've installed a different command with the same name.

And given that the error message appears to include a line number, I'm guessing that your /usr/local/bin/wget is a shell script that's intended to be a wrapper around the standard wget command.

For example, if you had something like:

#!/bin/bash

wget -q "[email protected]"

because you want to turn off wget's output, then your script will invoke itself recursively. After some number of iterations it will be unable to fork a new process, and it will terminate.

If so, changing the script to invoke /usr/bin/wget explicitly should fix it.

相关阅读:
Top