0

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!!

Shore
  • 827
  • 9
  • 24

1 Answers1

0

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
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • Hi, thanks for your answer. Let me try first...... however, a little bit worry of skipping these lines may cause any other problems?? – Shore Dec 25 '21 at 07:52
  • Well you should be able to read the code and understand what they do. The point is that since you are running the install while offline it will be >impossible< to pull updates from Github. (That's what offline means ...) – Stephen C Dec 25 '21 at 07:58
  • Hi I tried, failed again in the same place T T – Shore Dec 25 '21 at 07:59
  • So ... what did you try? Adding the option or removing the code? (Did you read where I said "I suspect that won't work" ?) – Stephen C Dec 25 '21 at 08:00
  • remove the if else, simply leave `export WITHOUT_PULL=1` – Shore Dec 25 '21 at 08:02
  • Hmmm ... OK ... add `set -x` near the start of the script and run it again to see what command is actually failing. – Stephen C Dec 25 '21 at 08:11
  • it says `ar: creating libr_winkd.a 0 0 0 0 0 0 0 0 --:--:-- 0:02:07 --:--:-- 0curl: (7) Failed connect to codeload.github.com:443; Connection timed out gmake[1]: *** [capstone-4.0.2.tar.gz] Error 7 gmake: *** [all] Error 2 + exit 1` – Shore Dec 25 '21 at 08:45