The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    centOS path issues

    Discussion in 'Linux Compatibility and Software' started by fzhfzh, Aug 9, 2010.

  1. fzhfzh

    fzhfzh Notebook Deity

    Reputations:
    289
    Messages:
    1,588
    Likes Received:
    0
    Trophy Points:
    55
    I'm currently playing around with my uni's computing cluster, it uses centOS, I was trying to compile and run a mpi (parallel programming library) code, and found 2 problems:
    1. I can't just compile with mpicc, I need to run it from the absolute directory, what do I need to do to add it to my environment variable or something such that I can just use the mpicc bash command?
    2. The library file could not be linked either, anyways to link the include path as well?
     
  2. Thomas

    Thomas McLovin

    Reputations:
    1,988
    Messages:
    5,253
    Likes Received:
    0
    Trophy Points:
    205
    Code:
    sudo make install
    
    inside the build directory?
     
  3. fzhfzh

    fzhfzh Notebook Deity

    Reputations:
    289
    Messages:
    1,588
    Likes Received:
    0
    Trophy Points:
    55
    It's already installed, it's a computing cluster, I'm only one of the users who wants to use it.
     
  4. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    I think you want to add to your PATH, either in .bashrc or .bash_profile:
    Code:
    PATH=$PATH:/path/to/mpicc
     
  5. helikaon

    helikaon Notebook Consultant

    Reputations:
    269
    Messages:
    288
    Likes Received:
    0
    Trophy Points:
    30
    what allurgoreries said, or you can make a link to existing executable and place that link to already known path ... e.g.

    echo $PATH
    (this will show you your different PATHs that are already included and searched if you type command in the shell, so if you add new one, you should see it too - also i'm sure, you see there the " /usr/local/bin" PATH so ...

    cd /usr/local/bin
    ln -s /path/to/executable anyname

    start shell, type 'anyname' ... that's it

    the /usr/local/bin path is always known and searched - i use it for my custom scripts, or links, usually easier, than add new path to my profile ...
     
  6. f4ding

    f4ding Laptop Owner

    Reputations:
    261
    Messages:
    2,085
    Likes Received:
    0
    Trophy Points:
    55
    The library should be in a directory included in $LD_LIBRARY_PATH.