How do in install radare2 from source offline?

180 Views Asked by At

Hi I downloaded radare2 source code and ran ./sys/install.sh

However it actually failed due to connection time out to codeload.github.com while under terminal prints "ar: creating libr_winkd.a".

I tried to google and search offline install method but haven't found any clue.

Thus I would like to ask how I should avoid this, what kind of dependency I should install in order to install radare2 offline??

Thanks a lot!!

1

There are 1 best solutions below

7
Stephen C On

I assume that the install.sh you ran is this one.

If you look at the script, you will see that it includes the following:

# update
if [ "$1" != "--without-pull" ]; then
    if [ -d .git ]; then
        git branch | grep "^\* master" > /dev/null
        if [ $? = 0 ]; then
            echo "WARNING: Updating from remote repository"
            # Attempt to update from an existing remote
            UPSTREAM_REMOTE=$(git remote -v | grep 'radareorg/radare2 (fetch)' | cut -f1 | head -n1)
            if [ -n "$UPSTREAM_REMOTE" ]; then
                git pull "$UPSTREAM_REMOTE" master
            else
                git pull https://github.com/radareorg/radare2 master
            fi
        fi
    fi
else
    export WITHOUT_PULL=1
    shift
fi

This appears to be what is causing the script to talk to Github.

One possible solution would be to add a --without-pull option to the script's arguments. But I suspect that that won't work. (It looks to me like the earlier options processing will "consume" the --without-pull ...)

Another possible solution would be to remove the above lines and replace them with:

export WITHOUT_PULL=1