-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sudo: tlmgr: command not found #13
Comments
Thanks for the report. I will have to think about this. First, an explanation: yes,
Or you can make an alias just for tlmgr, perhaps something like
|
Thanks for the explanation. One detail of this story I don't understand, though, and whose explanation maybe you know: It is not actually the case that the root's PATH is special. If I do
My system gives me
|
Thanks for catching me on that. You are right. Apparently this is an Ubuntu-specific behavior because Ubuntu builds I see a few options now: (1) tell the users (through output from (2) add (3) set the secure path in sudoers as described above. (4) recommend to the user that to use Do you have any suggestions on which you think is best for Thanks for the feedback. [1] http://stackoverflow.com/questions/257616/sudo-changes-path-why |
I think if a user is installing Texlive manually, they are ready to apply other manual tweaks if they are told to. I will personally just employ the I would suggest the installer should, at the end of the install process, explain the problem briefly, offer to add an alias (I think 2 is more general and easier to understand) and tell the user they can also apply the |
Thanks for your suggestions. I appreciate your thinking this through with me. I will think about this some more and ask others for advice on the best way to proceed. I'll post back here once I've decided what to do. |
My way to solve this issue:
This made the trick for me |
Thank you for posting your approach, Jose. I will take a look at this next time I work on this script. |
The error happens because the binary you are trying to call from command line is only part of the current user's PATH variable, but not a part of root user's PATH. You can verify this by locating the path of the binary you are trying to access. In my case I was trying to call "bettercap-ng". So I ran,
I checked whether this location is part of my root user's PATH.
output: So sudo cannot find the binary that I am trying to call from commandline. Hence returns the error command not found. You can direct sudo to use the current user's PATH when calling a binary like below.
In fact, one can make an alias out of it:
It's also possible to name the alias itself sudo, replacing the original sudo. Please refer to this video for step by step solution |
Hi all! I see the thread is quite old and so is the last post. I am not aware if something has changed in all this time, but since I am still facing a similar issue in 2018, (and also since this issue is still open), I have assumed it is still that way. I am a relatively inexperienced programmer, but I thought I'd share something. If the veterans here have the time, I would definitely appreciate the feedback. Idea
Why? And as I see the existing solutions look like patches more than permanent elegant solutions. And as an average user who wants to install the TeXLive essentials manually, it shouldn't be so complicated. To be honest, this was a good experience for me personally as I learned a lot about the Linux/Ubuntu system (not a complement!). Why not (maybe)?
|
@the1byo thank you very much for taking the time to write that up! Unfortunately, I still don't have time to allocate to this issue. I hope there is discussion from others, and I will try to follow when I can. |
I was glad to see your prompt response. Thank you for taking the time. Let's hope we get to the bottom of this soon! Cheers! :) |
Even though
/opt/texbin
was automagically added to $PATH (as seen from the output ofecho $PATH
), when I try to run tlmgr as root withsudo tlmgr
I getsudo: tlmgr: command not found
. My ugly workaround is to gocd /opt/texbin
and thensudo ./tlmgr
.I'm running Ubuntu 14.04
The text was updated successfully, but these errors were encountered: