PATH for WGET

Hello


I've installed wget


after the installation when I type man wget , I can now find the help.


But when I type in XTERM a wget command, I have :


-bash: wget: command not found


How can I know the path and modify it (I don t know where is the .Profile in iMAC) ?


see U

iMac, OS X Mountain Lion (10.8.4)

Posted on May 30, 2014 1:42 PM

Reply
15 replies

May 30, 2014 3:31 PM in response to Funnix

On my 10.9.3 machine, the path to wget is /usr/local/bin.


The .profile (lower case) is located in your login directory. Because of the preceding (.), it is hidden from the Finder and a casual Terminal ls (ell-s) command.


Providing you have TextEdit (or your favorite programmers editor) configured to open and save plain text files, you can do the following in the Terminal:


open -e .profile


export PATH=$HOME:/usr/local/bin:$PATH


#save .profile


source .profile


You have set up your login directory and /usr/local/bin to be searched before default system PATH locations. You have saved .profile, and using the source command, you have forced an update of the environment variable PATH.


You can now use wget, unless it is somewhere else from your installation.

May 31, 2014 12:35 PM in response to Funnix

Rolling your own is a PITA with GNU dependencies. I should have suggested the following.


Get the homebrew package manager, and install wget from the package manager. When done, wget is in /usr/local/bin.


In this homebrew link, go to the section entitled, INSTALL HOMEBREW. Copy and paste that curl syntax into your open Terminal window.


Then:


brew update

brew upgrade

brew install openssl # openssl is a dependency for wget

brew install wget


Providing you have /usr/local/bin in your PATH, you are good to go.

Jun 1, 2014 3:57 AM in response to Funnix

Unfortunaly the command brew is not available : command not found

The homebrew (brew) package manager is installed into /usr/local/bin, which is among the standard paths configured by OS X, and is found, providing you have the PATH environment variable minimally exported in one of the following files as:


export PATH=$PATH


The default bash shell search order on Terminal launch:


~/.bash_profile

~/.bash_login

~/.profile


If you run another bash shell from the command line, it will then read the personal initialization file (~/.bashrc) from your login directory. Personally, I have all of my personal stuff including PATH export in this file, and reference it from the ~/.bash_profile file as:


[[ -s ~/.bashrc ]] && source ~/.bashrc


I have single file maintenance restricted to the ~/.bashrc file. This file is processed first, if you launch a second bash shell from the login bash shell.


Read the invocation section of the bash(1) man page for further information.


(whereis command is not giving me any path)


The whereis(1) command says it will search standard binary directories -- just not /usr/local/bin, despite this being one of the default OS X search paths. Try which(1).


Jun 7, 2014 3:58 AM in response to Funnix

Hi,


I feel very angry, no one knows just how to install it under Mavericks OS ??????????????


I dowloaded the WGET. I move it in a personal Folder (called myWget) then I start compilation in that personal Folder :


Step One :

./configure --with-ssl=openssl


Step Two :

make


Step Three :

sudo make install


I finally have this sump-up in the XTERM window at the end of the compilation :

configure: Summary of build options:

Version: 1.15

Host OS: darwin13.2.0

Install prefix: /usr/local

Compiler: gcc

CFlags: -O2 -Wall

LDFlags:

Libs: -lssl -lcrypto -ldl -lz

SSL: openssl

Zlib: yes

Digest: yes

NTLM: yes

OPIE: yes

Debugging: yes


Then....didn't work !!!!!!!!!!!!

imacdejristophe:myWGET CompteKikoff$ wget

-bash: wget: command not found

Jun 7, 2014 4:41 AM in response to Funnix

I cannot launch the "wget binary" because :


imacdejristophe:/ CompteKikoff$ cd usr/local/bin/
-bash: cd: usr/local/bin/: Permission denied



I try the su command and give my imac session password but it didn t work...


How can I find the right password and the right command.

I suppose I have to launch WGET in this folder (usr/local/bin) correct ?


See U

Jun 7, 2014 5:47 AM in response to Funnix

By default, and with no login PATH environment variables set by you, OS X will provide the following default PATH settings:


  1. /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  2. /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin # with XQuartz 2.7.6 installed


The latter is the default PATH in a freshly launched Xterm. There should be no reason that you cannot access those applications installed into /usr/local/bin.


Even if you completely ignored my June 1 post about PATH precedence and settings, the steps in my May 31 post about installing and using homebrew package manager to alternatively install wget — would not be denied access to /usr/local/bin. The wget man page is installed in the standard OS X location: /usr/share/man/man1/wget.1.


In Finder, press shift+command+u and launch the Terminal.app. Follow the directions in my May 31 post. It worked for me.

Jun 11, 2014 5:59 AM in response to Funnix

Hello,


It still doesn t work to save the web site in aspx ..


I try firstly :

wget --save-cookies cookies.txt --post-data 'us er=Jgjfgfghjfg&pas sword=gfhjgj' ht tp://gfhdhgp/default.aspx?reason=1#booking


and then secondly :


wget --load-cookies cookies.txt -p h ttp://fgqsfgsfgqsfgsqsfg/pl


I finally got nothing but the first authentication page 😟


Has anyone the right command to capture an aspx website protected by a password ?


thanks for help

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

PATH for WGET

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.