MANPATH: Undefined variable. % ?

  • Thread starter Thread starter Atr cheema
  • Start date Start date
  • Tags Tags
    Ubuntu Variable
Click For Summary

Discussion Overview

The discussion revolves around an issue encountered while installing open source software on Ubuntu 16.04, specifically related to an undefined MANPATH variable when executing a C shell script. Participants explore potential causes and solutions, including environment variable settings and installation commands.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes encountering the error "MANPATH: undefined variable" when running a C shell script and seeks guidance on the issue.
  • Another participant suggests that MANPATH is an environment variable related to the "man" command and proposes installation commands to fix potential issues with the "man" utility.
  • A participant notes that the error persists even when executing the script directly from the terminal and provides the output of the manpath command, indicating that "man" is already installed.
  • Another participant clarifies that MANPATH should point to the location of "man pages" and speculates that the variable may not be carried over to the script's environment, suggesting checking the script for variable settings.
  • A later reply recommends checking the current value of MANPATH and suggests exporting it before running the script if it is not set.

Areas of Agreement / Disagreement

Participants express differing views on the cause of the issue and potential solutions, indicating that the discussion remains unresolved with multiple competing perspectives on how to address the undefined MANPATH variable.

Contextual Notes

There are limitations regarding the assumptions about the environment variable settings and the specific behavior of the C shell script, which remain unresolved.

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.
 

Similar threads

Replies
2
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 12 ·
Replies
12
Views
4K