Installing torch in Debian

3,184 views
Skip to first unread message

Afroze Ibrahim

unread,
Jul 24, 2015, 1:31:19 PM7/24/15
to torch7
Hi,

I try to install torch on my debian machine (Debian 8.1 Jessie), using the curl command but it returns the following error:

abaqapuri@futurix18:~/Afroze/software$ curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | PREFIX=~/torch bash
==> Only Ubuntu, Fedora, Archlinux and CentOS distributions are supported.

Is therre a way to make ezinstall work on a debian environment?

Also, I had torch preivously installed from 2 years ago (which I removed and continued with the new installation). At that time there was another installation procedure. If ezinstall won't work, maybe you can link me to the old way of installation - if it's possible to do it still...

Best,

Afroze


soumith

unread,
Jul 25, 2015, 12:46:44 PM7/25/15
to torch7 on behalf of Afroze Ibrahim
Hey Afroze,

The install-deps script should be fairly easy to adapt to debian, https://github.com/torch/ezinstall/blob/master/install-deps
You only have to change a few apt-get commands. Try giving it a shot.
--
S

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at http://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

Florian STRUB

unread,
Jul 26, 2015, 7:38:43 PM7/26/15
to torch7
@Afroze : I will have a look by tomorrow
I am writing a few tutorials how to configure/install torch and installing debian is on my TODO list, I had some issues (and solutions!) that I gonna share.

Florian STRUB

unread,
Jul 27, 2015, 9:00:14 AM7/27/15
to torch7
You may modify the script the following way
Tested on a clean computer with Jessie (stable)

I let smth chntla check it before adding it to the repo.


    # Detect CentOS
    elif [[ "$DISTRO" = "centos" ]]; then
        distribution="centos"
        centos_major_version="$VERSION"
    # Detect Dedian
    elif [[ "$DISTRO" = "debian" ]]; then
        distribution="debian"
        debian_major_version="$VERSION"

    else
        echo '==> Only Ubuntu, Fedora, Archlinux and CentOS distributions are supported.'
        exit 1
    fi

------------------------------------------------------------------

elif [[ $distribution == 'debian' ]]; then

    #only tested with Jessie
        if [[ $debian_major_version == '8' ]]; then
       
        #Basic package required for Torch
        declare -a target_pkgs
            target_pkgs=( build-essential gcc g++ curl \
                      cmake libreadline-dev git-core libqt4-core libqt4-gui \
                      libqt4-dev libjpeg-dev libpng-dev ncurses-dev \
                      imagemagick libzmq3-dev gfortran unzip gnuplot \
                      gnuplot-x11 ipython )
           
        sudo apt-get update

        sudo apt-get update
        sudo apt-get install -y "${target_pkgs[@]}"


        #require for iTorch
        sudo apt-get install nodejs nodejs-legacy #legacy -> http://stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu
        sudo apt-get install libssl-dev
        sudo apt-get install python-zmq

        #require for common torch plug-ins
        sudo apt-get install sox libsox-dev libsox-fmt-all npm libgraphicsmagick1-dev

        install_openblas
    fi       
    else
            echo "Only Jessie Debian 8 is supported for now, aborting."
            exit 1
     fi

soumith

unread,
Jul 27, 2015, 9:48:05 AM7/27/15
to torch7 on behalf of Florian STRUB
It looks good to me. 

--

Afroze Ibrahim

unread,
Jul 27, 2015, 1:50:52 PM7/27/15
to torch7
Hi Florian,  It looks good, thanks for the help! :)
But one thing - isn't the "fi" before "else" command extra? I might be mistaken...

Florian STRUB

unread,
Jul 29, 2015, 10:20:33 AM7/29/15
to torch7
Nope it is some typo error when I copy past :)

      
    else
            echo "Only Jessie Debian 8 is supported for now, aborting."
            exit 1
     fi
   fi  

would be better !

Enrico Gecko

unread,
Nov 25, 2015, 9:39:08 AM11/25/15
to torch7

肖文之

unread,
Jul 1, 2016, 10:56:37 PM7/1/16
to torch7
It works for me, thanks
Reply all
Reply to author
Forward
0 new messages