MANPATH: Undefined variable. % ?

  • Thread starter Thread starter Atr cheema
  • Start date Start date
  • Tags Tags
    Ubuntu Variable
AI Thread Summary
The issue arises when attempting to run a .csh file on Ubuntu 16.04, resulting in the error "MANPATH: undefined variable." This indicates that the MANPATH environment variable, which is crucial for the "man" command that displays application manuals, is not properly set in the shell running the script. Although "man" is installed, the variable's value is not being carried over from the login shell to the script's execution environment. To resolve this, users can check the current MANPATH by executing "echo $MANPATH" in the terminal. If it returns nothing, they should set the variable using "export MANPATH=$(manpath)" before running the .csh script. Additionally, reviewing the script for commands that set environment variables, such as "set" or "setenv," may provide further insights into the problem.
Atr cheema
Messages
67
Reaction score
0
I am installing an installing an open source software -on Ubuntu 16.04- by reading its 'http://ftp://ftp.chesapeakebay.net/../Modeling/Phase5/community/P53/README.txt' file. At certain point (point 3b in the link) the guideline requires me to run a .csh file located in a certain directory in order to generate executables. When I type csh on terminal in the required directory I am met with following line on terminal
Code:
MANPATH: undefined variable.
%

By pressing enter or Ctl+C nothing happens and I have to close the terminal. Can anyone guide me where is the error?
 
Computer science news on Phys.org
Atr cheema said:
I am installing an installing an open source software -on Ubuntu 16.04- by reading its 'http://ftp://ftp.chesapeakebay.net/../Modeling/Phase5/community/P53/README.txt' file. At certain point (point 3b in the link) the guideline requires me to run a .csh file located in a certain directory in order to generate executables. When I type csh on terminal in the required directory I am met with following line on terminal
Code:
MANPATH: undefined variable.
%

By pressing enter or Ctl+C nothing happens and I have to close the terminal. Can anyone guide me where is the error?
Is this step optional? I set up Ubuntu VMs all the time and there shouldn’t be any manual command line stuff unless you’re doing a very custom install or doing stuff after that’s company-specific.

MANPATH sounds like an environment variable and points to the command “man” which displays application manuals.

Not sure how it didn’t get installed but I’m assuming it can be fixed with
Sudo apt-get install man
Or
Sudo yum install manIf man already exists, you can simply set a perma-variable for it that points to the executable.
 
newjerseyrunner said:
Is this step optional? I set up Ubuntu VMs all the time and there shouldn’t be any manual command line stuff unless you’re doing a very custom install or doing stuff after that’s company-specific.

MANPATH sounds like an environment variable and points to the command “man” which displays application manuals.

Not sure how it didn’t get installed but I’m assuming it can be fixed with
Sudo apt-get install man
Or
Sudo yum install manIf man already exists, you can simply set a perma-variable for it that points to the executable.
If I execute the csh file from ubuntu terminal without going into interactive shell, the error persists. man is already installed and following is the output of manpath command when executed from terminal
Code:
/home/atrcheema/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man
 
newjerseyrunner said:
MANPATH sounds like an environment variable and points to the command “man” which displays application manuals.
No, MANPATH is supposed to point to the location of the "man pages" that the "man" command displays (e.g. "man ls").

Atr cheema said:
man is already installed and following is the output of manpath command when executed from terminal

Apparently the value of MANPATH isn't being carried over from your login shell to the shell that runs the script. Unfortunately, it's been a while since I've done this sort of thing, and I don't remember ever using a C shell script for this anyway, so my memory and knowledge are a bit fuzzy here. You might try looking at the script to see if there's a section that sets variables like this, using commands like "set" or "setenv". Or maybe you simply need to invoke the script in a different way that does carry over your environment variables such as MANPATH.
 
Atr cheema said:
If I execute the csh file from ubuntu terminal without going into interactive shell, the error persists. man is already installed and following is the output of manpath command when executed from terminal
Code:
/home/atrcheema/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man

Try running
Bash:
echo $MANPATH
(with MANPATH capitalised) in a terminal window. If this doesn't display anything then try doing
Bash:
export MANPATH=$(manpath)
before running your .csh script.
 
This week, I saw a documentary done by the French called Les sacrifiés de l'IA, which was presented by a Canadian show Enquête. If you understand French I recommend it. Very eye-opening. I found a similar documentary in English called The Human Cost of AI: Data workers in the Global South. There is also an interview with Milagros Miceli (appearing in both documentaries) on Youtube: I also found a powerpoint presentation by the economist Uma Rani (appearing in the French documentary), AI...
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
Back
Top