2

Due to the fact that freebsd pkg repos (binary) do not come with support for lame mp3, and I don't want to complicate things by having a dual dependency tree, I'm attempting a workaround by installing ffmpeg with pip.

Install: I've installed ffmpeg and youtube-dl using pip install youtube-dl ffmpeg --user

Finding the paths: find . -name ff\*´ returns that ffmpeg and ffprobe packages are installed in my ./.local/lib/python3.6/site-packages directory and there are two other noteworthy files: .../python3.6/site-packages/postprocessor/ffmpeg.py and .../python3.6/site-packages/postprocessor/__pycache__/ffmpeg.cpython36.pyc.

my youtube-dl is in ´~/.local/bin/´ and runs without any problems if i type out it's entire path, but my ffmpeg is not found. I read that editing my paths would solve this issue.

Edit Paths with sudo vim /etc/login.conf/ go to the section that says default:\ ...path= and add my youtube-dl path /usr/home/.local/bin/ as well as my ffmpeg path /usr/home/.local/lib/site-packages/

When I run youtube-dl ffmpeg is not found. When I try to execute youtube-dl without it's fullpathname it returns command not found.

What am I doing wrong?

4
  • 1
    I think it is easier to edit ~/.bashrc and set PATH there.
    – arrowd
    Commented Nov 27, 2019 at 3:31
  • alright, i'll try that
    – Andrew
    Commented Nov 27, 2019 at 20:52
  • i didn't think to check my $PATH with env first. I see now that what I set in login.conf does not correspond with the output of this command. My guess is that this is probably because my original installation was with CSH. I understand there is a simple command set that i can use to easily reset this. However I would like to know where my shell is pulling this from. All of the commands that I know of only show the value of $PATH, and not where it is located.
    – Andrew
    Commented Nov 27, 2019 at 21:25
  • this unix.stackexchange.com/a/154971/236541 is an interesting solution, but neither of the solutions mentioned show me all of the locations of PATH that I know about. Still not clear where the definitive PATH bash uses is being pulled from.
    – Andrew
    Commented Nov 27, 2019 at 21:41

1 Answer 1

1

It is not clear where the definitive PATH bash uses is being pulled from

You need to work through the list of bash startup files looking for commands that set the PATH variable.

Zsh/Bash startup files loading order (.bashrc, .zshrc etc.)

If you have ever put something in a file like .bashrc and had it not work, or are confused by why there are so many different files — .bashrc, .bash_profile, .bash_login, .profile etc. — and what they do, this is for you.

The issue is that Bash sources from a different file based on what kind of shell it thinks it is in. For an “interactive non-login shell”, it reads .bashrc, but for an “interactive login shell” it reads from the first of .bash_profile, .bash_login and .profile (only). There is no sane reason why this should be so; it’s just historical. Follows in more detail.

For Bash, they work as follows. Read down the appropriate column. Executes A, then B, then C, etc. The B1, B2, B3 means it executes only the first of those files found.

+----------------+-----------+-----------+------+
|                |Interactive|Interactive|Script|
|                |login      |non-login  |      |
+----------------+-----------+-----------+------+
|/etc/profile    |   A       |           |      |
+----------------+-----------+-----------+------+
|/etc/bash.bashrc|           |    A      |      |
+----------------+-----------+-----------+------+
|~/.bashrc       |           |    B      |      |
+----------------+-----------+-----------+------+
|~/.bash_profile |   B1      |           |      |
+----------------+-----------+-----------+------+
|~/.bash_login   |   B2      |           |      |
+----------------+-----------+-----------+------+
|~/.profile      |   B3      |           |      |
+----------------+-----------+-----------+------+
|BASH_ENV        |           |           |  A   |
+----------------+-----------+-----------+------+
|                |           |           |      |
+----------------+-----------+-----------+------+
|                |           |           |      |
+----------------+-----------+-----------+------+
|~/.bash_logout  |    C      |           |      |
+----------------+-----------+-----------+------+

Source Zsh/Bash startup files loading order (.bashrc, .zshrc etc.) | The Lumber Room

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .