MANPATH: Undefined variable. % ?

In summary: If 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/home/atrcheema/share/man:/usr/local/man:/usr/local/share/man:/usr/share/manTry runningecho $MANPATH(with MANPATH capitalised) in a terminal window. If this doesn't display anything then try doingexport MANPATH=$(manpath)before running your .csh script.
  • #1
Atr cheema
69
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
  • #2
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.
 
  • #3
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
 
  • #4
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.
 
  • #5
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.
 

Related to MANPATH: Undefined variable. % ?

What is MANPATH?

MANPATH stands for "manual path" and is an environment variable that tells the computer where to find the manual pages for installed software.

Why is MANPATH showing as an undefined variable?

This error typically occurs when the MANPATH variable has not been set or has been deleted. This can happen if the computer does not have the necessary software or if the variable has been accidentally removed.

How do I set the MANPATH variable?

The exact steps to set the MANPATH variable may vary depending on your operating system. In general, you can set the variable by using the "export" command in the terminal and specifying the path to your manual pages. For example, "export MANPATH=/usr/share/man" would set the variable to the standard location for manual pages on many Linux systems.

What happens if I don't have a MANPATH variable?

If the MANPATH variable is not set, the computer will not know where to look for manual pages and may not be able to display them. This can make it difficult to access important information about installed software.

Can I customize my MANPATH variable?

Yes, you can set the MANPATH variable to any directory that contains manual pages. This allows you to customize where the computer looks for manual pages and can be useful if you have multiple locations for manual pages or if you want to include specific directories for certain software.

Similar threads

Replies
2
Views
2K
  • Special and General Relativity
Replies
13
Views
2K
Replies
12
Views
3K
Back
Top