본문 바로가기

HPC

MC(Midnight Commaner) on NURION

module load

module load gcc/10.2.0
module load autoconf/2.72

 

tarball 받기

https://github.com/MidnightCommander/mc/tags

 

 

GitHub - MidnightCommander/mc: Midnight Commander's repository

Midnight Commander's repository. Contribute to MidnightCommander/mc development by creating an account on GitHub.

github.com

 ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: running: autopoint --force
autoreconf: running: aclocal -I m4 --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --include=m4 --force
autoreconf: running: /usr/bin/autoheader --include=m4 --force
autoreconf: running: automake --add-missing --copy --force-missing
Makefile.am:2: error: require Automake 1.14, but have 1.13.4
autoreconf: automake failed with exit status: 1

 

mc 4.8.33은 automake 1.14가 필요한데, NURION은 1.13.4를 제공하므로, 더 낮은버전으 찾으면, 4.8.32를 쓰면 되겠다.

 

 

 

autogen.sh를 하려면 gettext를 설치하여야 한다

wget https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz
tar -xvf gettext-0.21.tar.xz
cd gettext-0.21
./configure --prefix=$HOME/local
make
make install

 

 

 

 

 

 

MC의 configure를 해보자

 

MC는 Screen library는 S-Lang또는 ncurses를 사용하는데, 디폴트가 S-Lang이므로 ncurses를 사용하기 위해서는 옵션을 아래와 같이 변경한다. ncurses 세팅은 다른 포스팅 참조

 

make distclean

./configure --prefix=$HOME/local \
--with-screen=ncurses

make -j
make install

 

 

설치 후, mc에서 디렉토리 변경한 위치를 유지하고 싶은 경우

# Environment Setup for Midnight Commander
export PATH="$HOME/local/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/local/lib:$HOME/local/lib64:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig:$HOME/local/lib64/pkgconfig:$PKG_CONFIG_PATH"

mc() {
    local MC_USER=$(whoami)
    local MC_PWD_FILE="${TMPDIR:-/tmp}/mc-$MC_USER/mc.pwd.$$"
    /home01/a1901a01/local/bin/mc -P "$MC_PWD_FILE" "$@"

    if [ -r "$MC_PWD_FILE" ]; then
        local MC_PWD=$(cat "$MC_PWD_FILE")
        if [ -n "$MC_PWD" ] && [ -d "$MC_PWD" ] && [ "$MC_PWD" != "$PWD" ]; then
            cd "$MC_PWD"
        fi
        unset MC_PWD
    fi

    rm -f "$MC_PWD_FILE"
    unset MC_PWD_FILE
    unset MC_USER
}

'HPC' 카테고리의 다른 글

Ncurses  (0) 2025.04.14
디렉토리 관리 in NURION  (0) 2025.04.13
NURION사용시 필요한 라이브러리들  (0) 2025.04.10
Tmux on NURION  (0) 2025.04.10
시스템 메모리 체크  (0) 2025.03.05