Terminal shows a warning while installing: Not on PATH - how to fix? (SOLVED)

linux_user96

New Member
Joined
Dec 19, 2021
Messages
24
Reaction score
5
Credits
203
I am trying to install "youtube-dl" and this warning is shown in my command line:

WARNING: The script youtube-dl is installed in '/home/linuxmint/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

so what is the right thing to do here? just suppress the warning? what will happen if I do that?
 


D

Deleted member 108694

Guest
It is telling you that the youtube-dl is installed but in the wrong place - I would delete that file
Code:
sudo apt purge youtube-dl
or navigate there via root and manually delete it - and install it like this
The preferred way to install is using pip: First install pip
Code:
sudo apt install python3-pip
now install youtube-dl
Code:
pip install youtube-dl
or
Code:
sudo -H pip install --upgrade youtube-dl
to update it
Code:
sudo pip install -U youtube-dl

NOTE:youtube-dl can also be installed via a package manager (e.g. sudo apt install youtube-dl), but these versions are almost always outdated, due to the fast pace that websites are updated.
 
Last edited by a moderator:
OP
L

linux_user96

New Member
Joined
Dec 19, 2021
Messages
24
Reaction score
5
Credits
203
It is telling you that the youtube-dl is installed but in the wrong place - I would delete that file
Code:
sudo apt purge youtube-dl
or navigate there via root and manually delete it - and install it like this
The preferred way to install is using pip: First install pip
Code:
sudo apt install python3-pip
now install youtube-dl
Code:
pip install youtube-dl
or
Code:
sudo -H pip install --upgrade youtube-dl
to update it
Code:
sudo pip install -U youtube-dl

NOTE:youtube-dl can also be installed via a package manager (e.g. sudo apt install youtube-dl), but these versions are almost always outdated, due to the fast pace that websites are updated.
thx that worked. stay safe and healthy out there!
 

JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,793
Reaction score
2,605
Credits
15,178
The other option would be to simply add $HOME/.local/bin to your $PATH environment variable.

See this rather long post here:

The answer in the link above is related to adding a personal /bin directory.

The part you need is where /etc/X11/Xsession is edited to alter $PATH to include $HOME/.local/bin.

That particular path is a useful one to have in your $PATH as it is one that is used by some packages. However, it’s not typically set up by default.
By adding the code recommended in the above post, if anything gets installed there and that directory exists, it will get added to $PATH and any executables there will be available to you.
 
Last edited:
N

NorthWest

Guest
There was news I read that the maintainer of youtube-dl has declared himself inactive, which I guess means that the development of the program is stalled. There is an alternative here: https://github.com/yt-dlp/yt-dlp, called yt-dlp, which may be in the repositories of lots of distributions by now. It is so in debian. I compared the download speeds of youtube-dl and yt-dlp and there was a dramatic difference in favour of yt-dlp. There are also a number of extra features in yt-dlp which are outlined in the github page.
 
D

Deleted member 108694

Guest
There was news I read that the maintainer of youtube-dl has declared himself inactive, which I guess means that the development of the program is stalled. There is an alternative here: https://github.com/yt-dlp/yt-dlp, called yt-dlp, which may be in the repositories of lots of distributions by now. It is so in debian. I compared the download speeds of youtube-dl and yt-dlp and there was a dramatic difference in favour of yt-dlp. There are also a number of extra features in yt-dlp which are outlined in the github page.
Also have a look here - https://github.com/ytdl-org/youtube-dl/issues/30568 and here - https://github.com/ytdl-org/youtube-dl/commit/21b759057502c6e70d51011cfb3fb86d8405518

To install yt-dlp - make sure Python3-pip is installed first
Code:
sudo apt install python3-pip
now install yt-dlp
Code:
sudo python3 -m pip install -U yt-dlp
to update run
Code:
sudo yt-dlp -U
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
10,677
Reaction score
9,168
Credits
88,641
Darn it... An article on yt-dlp is actually on my short list of articles to write.

I may still write it. LOL
 

Staff online

Members online


Top