LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bash covertly executing command (https://www.linuxquestions.org/questions/linux-newbie-8/bash-covertly-executing-command-4175538818/)

sunoc 04-05-2015 11:17 AM

Bash covertly executing command
 
Hi all,

So ever since I installed livestreamer yesterday, oftentimes when I execute a command in bash it seems to be executing livestreamer and treating everything I actually entered as arguments. For example, I will type

sudo emerge -cav livestreamer

and I will get an error messaging advising me not to run livestreamer as root.

This seems to happen 100% of the time when the command I intend to issue refers to livestreamer in any way, and only some of the times when it doesn't.

I'm pretty new to linux, and I've been able to google my way out of a few problems so far, but this one has me baffled. I've checked my bashrc file for things out of the ordinary, but to no avail. Any and all help would be really appreciated. If I've left anything out let me know.

Keruskerfuerst 04-05-2015 02:43 PM

If you execute emerge xyz, you install the program.

sunoc 04-05-2015 03:19 PM

Thanks for the response.

Sorry, but I'm not sure I understand what you mean. I think what I wrote in the OP might be a bit unclear.

Ever since installing livestreamer yesterday, whenever I try to execute emerge [something], bash seems to be interpretting this as livestreamer [something]. For another example, if I try to run

emerge --ask libreoffice

I get the error message

usage: emerge [OPTIONS] [URL] [STREAM]

which would be the correct error message if I actually issued a livestreamer command, except of course that it would say livestreamer instead of emerge.

But it isn't limited to just emerge. If I try, say, sudo equery [xyz], I will get the error message mentioned in the first post.

I just don't have the basic under-the-hood understanding of Linux required to being to figure out what exactly is the problem here. I spent a very long time installing Gentoo and getting it to the point I'm at now, so I'm very hesitant to uninstall or reinstall, but it's basically unusable at the moment.

Keruskerfuerst 04-06-2015 01:57 AM

To check out what options a program needs:

info <program>.

Have you read the gentoo handbook?

exvor 04-07-2015 11:27 AM

Sounds like you have an alias or something borked in your system and is being executed instead of emerge.

I know its cliche but have you rebooted the system?

cepheus11 04-07-2015 01:04 PM

Yes, looks like some insane alias or symlink.

You can view your aliases with
Code:

alias
And

Code:

file $(which emerge)
should tell you that it is a symlink to "python-exec". And python-exec should call /usr/lib/python-exec/python<version>/emerge. Can you call that directly?

jpollard 04-08-2015 07:30 AM

You might also check your prompt strings - these can also be used to invoke programs, as is frequently done to indicate a current directory.


All times are GMT -5. The time now is 01:30 AM.