자유게시판

예전에 리눅스를 몇번 시도하였으나 설치 후 바로 지운경험이 있습니다.
윈도우7의 지원 종료로 다시 리눅스를 고민하다. 국내os가 있음을 알게되었고 하모니카os도 알게 되었습니다.
설치 후 대만족 중입니다.

그러나 프린터 드라이버 설치 중 난관을 만났습니다.

 

0. 제 리눅스 버전은

  - 릴리즈 Linux Mint 17.3 Rosa 32비트

  - 커널 Linux 3.19.0-32-generic i686

  - MATE 1.12.0

 

0. 제 프린터는

  - 캐논 MF638cwz

 

0. 캐논에서 제공하는 리눅스버전 드라이버를 다운 받았습니다. 압축을 풀고 열어보니 폴더와 파일이 있네요.

폴더.jpg

 

0. install 이 있습니다. 가볍게 실행합니다. 그리곤 암호문이 나왔습니다. 어찌해야 하나요? 도와주세요..

 

1. 터미널에서 설치해야 하는건가요? 패키지관리자에서 설치하는건가요?

2. 제가 설치한 리눅스는 설치파일 확장자명이 어떤걸 써야 하는건가요?

3. 그리고 이런경우 전 어떻게 설치해야 하나요?

 

#!/bin/bash

##############################################################################
##
##  Canon Laser Printer Driver for Linux
##  Copyright CANON INC. 2015
##
##  This program is free software; you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation; either version 2 of the License, or
##  (at your option) any later version.
##
##  This program is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License for more details.
##
##  You should have received a copy of the GNU General Public License
##  along with this program; if not, write to the Free Software
##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
##
##############################################################################


#-------------------------------------------------#
# install package list define
#-------------------------------------------------#
INSTALL_PACKAGE_RPM_32="
pangox-compat
beecrypt
beecrypt-devel
libglade2"

INSTALL_PACKAGE_RPM_64="
pangox-compat
libxml2
libxml2.i686
glibc glibc.i686
libstdc++
libstdc++.i686
libjpeg-turbo
libjpeg-turbo.i686
beecrypt.i686
beecrypt-devel.i686
libglade2"

INSTALL_PACKAGE_DEB_32="
libglade2-0
libjpeg62
libbeecrypt7
libbeecrypt-dev"

INSTALL_PACKAGE_DEB_64="
libglade2-0
libstdc++6:i386
libxml2:i386
libjpeg62:i386
libbeecrypt7:i386
libbeecrypt-dev:i386"

INSTALL_PACKAGE_DEB_64_IA32="
ia32-libs
libglade2-0
libjpeg62:i386
libbeecrypt7:i386
libbeecrypt-dev:i386"


#-------------------------------------------------#
# install message
#-------------------------------------------------#
INST_ERR_01_01="The current user is "
INST_ERR_01_02="Change user to root, and then perform installation again."

INST_COM_01_01="#----------------------------------------------------#"

INST_MSG_01_01="This installer is recommended for Fedora or Ubuntu distributions that are currently supported as of the release of this installer."
INST_MSG_01_04=""
INST_MSG_01_05="If this installer is run under earlier or later distributions, the installation of additional system libraries may be necessary after driver installation is complete."
INST_MSG_01_06="Do you want to continue with installation? (y/n) "

INST_MSG_02_01="Some system libraries could not be installed."
INST_MSG_02_02="Refer to the online manual for more information."
INST_MSG_02_03="Do you want to continue with installation? (y/n) "


#-------------------------------------------------#
# etc. define
#-------------------------------------------------#
ERROR_CHECK=0
MACHINE_TYPE=""
PACKAGE_TYPE=""
RELEASE_DIR=""
DRIVER_PACKAGE=""
INSTALL_PACKAGE=""
INSTALL_CMD=""
INSTALL_OPT=""
INSTALL_PACKAGE_CMD=""

COLOR_K='\033[1;30m'
COLOR_R='\033[1;31m'
COLOR_G='\033[1;32m'
COLOR_Y='\033[1;33m'
COLOR_B=''
COLOR_M='\033[1;35m'
COLOR_C='\033[1;36m'
COLOR_OFF='\033[m'


#-------------------------------------------------#
# common function
#-------------------------------------------------#
C_output_log()
{
    echo -e -n $COLOR_B
    echo -e $INST_COM_01_01
    echo -e "# $1"
    echo -e $INST_COM_01_01
    echo -e -n $COLOR_OFF
}


C_output_message()
{
    echo -e -n $COLOR_B
    echo -e "$1"
    echo -e -n $COLOR_OFF
}


C_output_error_message()
{
    echo -e -n $COLOR_R
    echo -e "$1"
    echo -e -n $COLOR_OFF
}


C_check_distribution()
{
    C_output_message "$INST_MSG_01_01"
    C_output_message "$INST_MSG_01_04"
    C_output_message "$INST_MSG_01_05"
    read -p "$INST_MSG_01_06" ans
    if [ "$ans" != "y" -a "$ans" != "Y" ]; then
        exit 1
    fi
    echo
}
   

C_check_directory()
{
    echo "${0}" | grep '/' >/dev/null  2>&1
    if [ "${?}" -eq 0 ]; then
        shell_dir="${0%/*}"
        cd "${shell_dir}"
    fi
}


C_init_cups()
{
    C_output_log "cups $1"

    if [ -f /etc/init.d/cups ]
    then
        CMD="/etc/init.d/cups $1"
        echo $CMD
        $CMD
    elif [ -f /etc/init.d/cupsys ]
    then
        CMD="/etc/init.d/cupsys $1"
        echo $CMD
        $CMD
    else
        CMD="service cups $1"
        echo $CMD
        $CMD
    fi
    echo
}


C_install_package()
{
    case $PACKAGE_TYPE in
    'deb')
        C_output_log "apt-get update"
        apt-get update
        echo
        ;;
    'rpm')
        C_output_log "$INSTALL_PACKAGE_CMD upgrade"
        for upgrade_pkg in $INSTALL_PACKAGE
        do
            echo "$upgrade_pkg"
            $INSTALL_PACKAGE_CMD -y upgrade $upgrade_pkg
            echo
        done
        ;;
    esac

    C_output_log "$INSTALL_PACKAGE_CMD install"

    $INSTALL_PACKAGE_CMD -y install $INSTALL_PACKAGE

    echo
}


C_install_package_check()
{
    C_output_log "Install Package Check"

    for inst_pkg in $INSTALL_PACKAGE
    do
        if which rpm > /dev/null 2>&1;
        then
            echo $inst_pkg | grep '\.'  > /dev/null 2>&1
            if [ $? -eq 0 ]; then
                LIB_NAME=`echo $inst_pkg | cut -d '.' -f1`
                ARCH=`echo $inst_pkg | cut -d '.' -f2`
                rpm -qa | grep -i $LIB_NAME | grep -i $ARCH > /dev/null 2>&1
            else
                rpm -qa | grep -i $inst_pkg > /dev/null 2>&1
            fi
        else
            echo $inst_pkg | grep ":" > /dev/null 2>&1
            if [ $? -eq 0 ]; then
                LIB_NAME=`echo $inst_pkg | cut -d ':' -f1`
                ARCH=`echo $inst_pkg | cut -d ':' -f2`
                dpkg -l | grep -i $LIB_NAME | grep -i $ARCH > /dev/null 2>&1
            else
                dpkg -l | grep -i $inst_pkg > /dev/null 2>&1
            fi
        fi

        if [ $? -eq 0 ]; then
            C_output_message " OK: $inst_pkg"
        else
            C_output_error_message   " NG: $inst_pkg"
            ERROR_CHECK=1
        fi
    done

    echo
   
    if [ $ERROR_CHECK -eq 1 ]; then
        C_output_message "$INST_MSG_02_01"
        C_output_message "$INST_MSG_02_02"
        read -p "$INST_MSG_02_03" ans
        if [ "$ans" != "y" -a "$ans" != "Y" ]; then
            exit 1
        fi
        echo
    fi
}


C_install_printer_driver()
{
    C_output_log "Install Printer Driver ($INSTALL_CMD $INSTALL_OPT)"

    unset DRIVER_PACKAGE
    DRIVER_PACKAGE=`find . -name "*$MACHINE_TYPE.$PACKAGE_TYPE"  | grep -i common`
    $INSTALL_CMD $INSTALL_OPT $DRIVER_PACKAGE

    unset DRIVER_PACKAGE
    DRIVER_PACKAGE=`find . -name "*$MACHINE_TYPE.$PACKAGE_TYPE" | grep -v common`
    $INSTALL_CMD $INSTALL_OPT $DRIVER_PACKAGE
    echo
}


#-------------------------------------------------#
# deb function
#-------------------------------------------------#
check_install_ia32()
{
    #-------------------------------------
    # Ubuntu only
    #-------------------------------------
    grep -i -e ubuntu /etc/issue > /dev/null 2>&1
    if [ $? -ne 0 ]; then
        return 0
    fi

    if [ ! -f /etc/lsb-release ]; then
        return 0
    fi

    VER=`grep -i release /etc/lsb-release | sed -e 's/[^0-9]//g'`
    if [ $VER -le 1304 ]; then
        INSTALL_PACKAGE=$INSTALL_PACKAGE_DEB_64_IA32
    fi
}


#-------------------------------------------------#
# start install.sh
#-------------------------------------------------#
main()
{
    #---------------
    # check root
    #---------------
    if test `id -un` != "root"; then
        C_output_error_message "$INST_ERR_01_01`id -un`."
        C_output_error_message "$INST_ERR_01_02"
        exit 1
    fi
   
    #---------------------
    # check directory
    #---------------------
    C_check_directory
   
    #---------------------
    # check distribution
    #---------------------
    C_check_distribution
   
    #------------------------
    # get distribution data
    #------------------------
    case `uname` in
    'SunOS')
        EXE_PATH='/opt/sfw/cups/sbin'
        ;;
    'HP-UX')
        EXE_PATH='/usr/sbin:/usr/bin'
        ;;
    'AIX')
        EXE_PATH='/usr/sbin:/usr/bin'
        ;;
    'Linux')
        EXE_PATH='/usr/sbin:/usr/bin'
        ;;
    esac
   
    export PATH=$EXE_PATH:$PATH
   
    if which rpm > /dev/null 2>&1;
    then
        PACKAGE_TYPE="rpm"
        INSTALL_CMD="rpm"
        INSTALL_OPT="-Uvh"
        if which yum > /dev/null 2>&1;
        then
            INSTALL_PACKAGE_CMD="yum"
        else
            INSTALL_PACKAGE_CMD="dnf"
        fi

        case `uname -m` in      
        'i386'|'i686')      
            MACHINE_TYPE="i386"      
            INSTALL_PACKAGE=$INSTALL_PACKAGE_RPM_32
            ;;      
        'x86_64')      
            MACHINE_TYPE="x86_64"      
            INSTALL_PACKAGE=$INSTALL_PACKAGE_RPM_64
            ;;      
        esac
    else
        PACKAGE_TYPE="deb"
        INSTALL_CMD="dpkg"
        INSTALL_OPT="-i --force-overwrite"
        INSTALL_PACKAGE_CMD="apt-get"
   
        case `uname -m` in      
        'i386'|'i686')      
            MACHINE_TYPE="i386"      
            INSTALL_PACKAGE=$INSTALL_PACKAGE_DEB_32
            ;;      
        'x86_64')      
            MACHINE_TYPE="amd64"      
            INSTALL_PACKAGE=$INSTALL_PACKAGE_DEB_64
            check_install_ia32
            ;;      
        esac
    fi
   
    #------------------------
    # install start
    #------------------------
    C_output_log "Install Start"
    C_output_message "Machine Type = $MACHINE_TYPE"
    C_output_message "Package Type = $PACKAGE_TYPE"
   
    DRIVER_PACKAGE=`find . -name "*$MACHINE_TYPE.$PACKAGE_TYPE" | sort 2> /dev/null`
   
    C_output_message "Package list = "
   
    for list in $DRIVER_PACKAGE
    do
        C_output_message "    $list"
    done
    echo
   
    C_install_package
    C_install_package_check
    C_install_printer_driver
    C_init_cups restart
}

main $*

C_output_message "Complete"

exit 0
 

 

 

번호 제목 추천 수 글쓴이 날짜 조회 수
558 lutris로 게임을 깔고있는데 어떻게 해야할지 모르겠어요 도와주세요 [1] 0 라루미 2020.03.05 654
557 명령어 발동이 안됩니다.. 도와주세요 [1] file 0 라루미 2020.03.05 264
556 하모니카 좋네요! [3] 0 동네노는이장 2020.03.05 524
555 유튜브 추천합니다. [2] 0 neti 2020.03.05 436
554 스팀에서 리눅스지원 안되는게임을 할수있는 방법은 없을까요? [9] 0 라루미 2020.03.04 663
553 와인5.0의 기반으로 카카오톡을 설치하는 방법이나 링크가 있다면 공유부탁드립니다. [2] 0 코드메이커 2020.03.03 1925
552 공유기 없이 살기 [3] 0 neti 2020.03.02 718
551 하모니카3.0은 와인이 자동적으로 설치가 되어있나요? [2] 0 라루미 2020.03.01 410
550 하모니카에서 리그오브레전드를 하고싶은데요 자세한 설치방법 좀 알려주실수있나요? [4] 0 라루미 2020.03.01 476
549 제가 하드디스크가 2개가 있는데.. 리눅스에선 1TB 하드디스크 가 인식이 안되는것 같네요 [3] 0 라루미 2020.02.29 318
548 [질문] 갑자기 한글이 안써지네요. [3] 0 iloveapink 2020.02.15 879
547 한국 정부의 탈 윈도우 정책과 하모니카os, 티맥스, 구름os 에 대한 소개 기사 0 야흔 2020.02.14 3298
546 WINE 통한 카톡에서 한글 입력이 엉망으로 나옵니다. 도와주실 수 있나요? [2] 0 뚱돌프 2020.02.12 839
545 (해결좀 해주세요 ㅠ) 윈도우 원격 데스크톱으로 접속해서 xorg 세션으로 로그인 하면 접속한 pc화면과 다른 화면이 나옵니다. [4] 0 뚜두두둔 2020.02.10 956
544 WINE 설치 중에 망가진 고정 패키지가 있다며 멈춰버리네요.ㅠ [5] 0 뚱돌프 2020.02.10 3109
543 오 갠츈하네요! [1] 0 제이워커 2020.02.08 602
542 720*480 dvd 렌더링 [2] 0 neti 2020.02.06 606
541 하모니카os 설치가 끝났습니다! [2] 0 Goodsims 2020.02.05 801
540 하모니카os를 설치해햐 할까요? [3] 0 Goodsims 2020.02.04 861
539 img파일로 부팅디스크는 어떻게 만드나요? [3] 0 joon 2020.02.02 873
  • 하모니카 미디어 에디션
  • 설치가 필요없는 화상통화 하모니
loginbox2
아직 회원이 아니세요? 회원가입