I have Go installed on my system (Ubuntu 14.04), and the $PATH
is correctly set up. When I give the command go
on my terminal, I get this:
Go is a tool for managing Go source code.
Usage:
go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files
doc show documentation for package or symbol
env print Go environment information
bug start a bug report
fix run go tool fix on packages
fmt run gofmt on package sources
generate generate Go files by processing source
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet run go tool vet on packages
Use "go help [command]" for more information about a command.
Additional help topics:
c calling between Go and C
buildmode description of build modes
filetype file types
gopath GOPATH environment variable
environment environment variables
importpath import path syntax
packages description of package lists
testflag description of testing flags
testfunc description of testing functions
Use "go help [topic]" for more information about that topic.
However, I'm currently trying to install hub, and I have successfully clone the repository, but when I execute script/build -o ~/bin/hub, I get this error message:
script/build: line 43: go: command not found
The line contains this content:
local version="$(go version)"
What is causing this error? I tried listing out the current path using echo "$pwd"
, but it doesn't give any output.
Hi thanks for reporting this. Have you solved this in the meantime? It's very confusing that you're able to run go
from your terminal, but when you run script/build
, the go
command is suddenly unavailable. 馃槙 This could only be possible if script/build
messes up the PATH somehow, which it doesn't, since nothing in that script edits the PATH
variable.
Hi adl1995, I followed these instructions, and script/build recognizes go 1.8.
However, there are interrupted system calls.
~/hub$ script/build -o ~/bin/hub
go build github.com/github/hub/vendor/github.com/atotto/clipboard: /usr/local/go/pkg/tool/linux_amd64/compile: read |0: interrupted system call
go build github.com/github/hub/vendor/github.com/mattn/go-isatty: /usr/local/go/pkg/tool/linux_amd64/compile: read |0: interrupted system call
go build github.com/github/hub/vendor/github.com/BurntSushi/toml: /usr/local/go/pkg/tool/linux_amd64/compile: read |0: interrupted system call
go build github.com/github/hub/vendor/github.com/octokit/go-octokit/vendor/github.com/fhs/go-netrc/netrc: /usr/local/go/pkg/tool/linux_amd64/compile: read |0: interrupted system call
go build github.com/github/hub/vendor/github.com/octokit/go-octokit/vendor/github.com/jingweno/go-sawyer/hypermedia: /usr/local/go/pkg/tool/linux_amd64/compile: read |0: interrupted system call
go build github.com/github/hub/vendor/golang.org/x/crypto/ssh/terminal: /usr/local/go/pkg/tool/linux_amd64/compile: read |0: interrupted system call
go build github.com/github/hub/vendor/github.com/ogier/pflag: /usr/local/go/pkg/tool/linux_amd64/compile: read |0: interrupted system call
~/bin/hub does not exist, and even after mkdir ~/bin/hub, the error persists. Anyone knows how to resolve this?
@zhengqunkoo Yours sounds like a very different problem. If it persists, would you please open a separate issue for it?
@adl1995 Did you ever solve your problem? Are you still unable to build hub on your machine?
@mislav - Thank you for following up!
Yes, I resolved the go
issue. I think my PATH
was messed up, I fixed it by re-updating using:
export PATH=$PATH:/usr/local/go/bin
However, I am faced with another problem now. When doing make install prefix=/usr/local
, I'm getting this error:
Installing tilt 1.3.3
Using bundler 1.12.5
An error occurred while installing ffi (1.9.3), and Bundler cannot continue.
Make sure thatgem install ffi -v '1.9.3'
succeeds before bundling.
Could not find ffi-1.9.3 in any of the sources
You need Ruby 1.9 or higher and Bundler to run hub tests
make: * [bin/ronn] Error 1
But, then I checked my Ruby version using ruby -v
which came to be:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Is it possible that I have two versions installed which are conflicting with each other?
Hi @mislav, I'm using the Windows Subsystem for Linux (aka Ubuntu 14.04 on Windows). Didn't solve this problem, but found a workaround. Installed linuxbrew and did brew install hub
.
@adl1995 Can you try script/bootstrap
again to retry installing the necessary dependencies? It's not right that "ffi" gem install should not be found, since I can see that it's available here: https://rubygems.org/gems/ffi/versions/1.9.3
@mislav I just tried this, but got the same error:
Gem files will remain installed in /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/rdiscount-1.6.8 for inspection.
Results logged to /home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/rdiscount-1.6.8/gem_make.out
Using tilt 1.3.3
Using bundler 1.12.5
An error occurred while installing ffi (1.9.3), and Bundler cannot continue.
Make sure thatgem install ffi -v '1.9.3'
succeeds before bundling.
Could not find ffi-1.9.3 in any of the sources
You need Ruby 1.9 or higher and Bundler to run hub tests
@adl1995 Very strange. Can you try bundle update ffi
?
@mislav Here is the full output of the above command:
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Installing ffi 1.9.18 (was 1.9.3) with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c
/usr/local/bin/ruby -r ./siteconf20170627-30569-53acus.rb extconf.rb
* extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/usr/local/lib/ruby/2.3.0/mkmf.rb:456:intry_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.3.0/mkmf.rb:541:in
try_link0'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:556:intry_link' from /usr/local/lib/ruby/2.3.0/mkmf.rb:657:in
try_ldflags'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1813:inpkg_config' from extconf.rb:15:in
' To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/ffi-1.9.18/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18 for inspection.
Results logged to /home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/ffi-1.9.18/gem_make.out
Using builder 3.2.2
Using diff-lcs 1.2.5
Using multi_json 1.10.1
Using multi_test 0.1.1
Using rspec-support 3.0.2
Installing hpricot 0.8.4 with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/hpricot-0.8.4/ext/fast_xs
/usr/local/bin/ruby -r ./siteconf20170627-30569-1c6qf8p.rb extconf.rb
checking for stdio.h... * extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
/usr/local/lib/ruby/2.3.0/mkmf.rb:456:intry_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.3.0/mkmf.rb:587:in
try_cpp'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1091:inblock in have_header' from /usr/local/lib/ruby/2.3.0/mkmf.rb:942:in
block in checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:inblock (2 levels) in postpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in
open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:inblock in postpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in
open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:346:inpostpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:941:in
checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1090:inhave_header' from extconf.rb:2:in
' To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/hpricot-0.8.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/hpricot-0.8.4 for inspection.
Results logged to /home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/hpricot-0.8.4/gem_make.out
Using mustache 0.99.4
Using rack 1.4.1
Installing rdiscount 1.6.8 with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/rdiscount-1.6.8/ext
/usr/local/bin/ruby -r ./siteconf20170627-30569-1va135f.rb extconf.rb
checking for random()... * extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/lib
/usr/local/lib/ruby/2.3.0/mkmf.rb:456:intry_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.3.0/mkmf.rb:541:in
try_link0'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:556:intry_link' from /usr/local/lib/ruby/2.3.0/mkmf.rb:765:in
try_func'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1051:inblock in have_func' from /usr/local/lib/ruby/2.3.0/mkmf.rb:942:in
block in checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:inblock (2 levels) in postpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in
open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:inblock in postpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in
open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:346:inpostpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:941:in
checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1050:inhave_func' from extconf.rb:5:in
' To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/rdiscount-1.6.8/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/rdiscount-1.6.8 for inspection.
Results logged to /home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/rdiscount-1.6.8/gem_make.out
Using tilt 1.3.3
Using bundler 1.12.5
An error occurred while installing ffi (1.9.18), and Bundler cannot continue.
Make sure thatgem install ffi -v '1.9.18'
succeeds before bundling.
I also tried gem install ffi -v '1.9.18'
, which produced this output:
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.current directory: /usr/local/lib/ruby/gems/2.3.0/gems/ffi-1.9.18/ext/ffi_c
/usr/local/bin/ruby -r ./siteconf20170627-30619-3yd8jt.rb extconf.rb
* extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/usr/local/lib/ruby/2.3.0/mkmf.rb:456:intry_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.3.0/mkmf.rb:541:in
try_link0'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:556:intry_link' from /usr/local/lib/ruby/2.3.0/mkmf.rb:657:in
try_ldflags'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1813:inpkg_config' from extconf.rb:15:in
' To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/ffi-1.9.18/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.3.0/gems/ffi-1.9.18 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/ffi-1.9.18/gem_make.out
@adl1995 That sounds like you need the necessary Ruby headers on your machine to install gems with native extensions? Typically this is called ruby-dev
or libruby
in your package manager. Then retry the bundle update ffi
command again.
@mislav So, I installed both ruby-dev
and libruby
through apt-get
, but I'm still getting the same error:
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Installing ffi 1.9.18 (was 1.9.3) with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c
/usr/local/bin/ruby -r ./siteconf20170628-31921-ma95sc.rb extconf.rb
* extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/usr/local/lib/ruby/2.3.0/mkmf.rb:456:intry_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.3.0/mkmf.rb:541:in
try_link0'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:556:intry_link' from /usr/local/lib/ruby/2.3.0/mkmf.rb:657:in
try_ldflags'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1813:inpkg_config' from extconf.rb:15:in
' To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/ffi-1.9.18/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18 for inspection.
Results logged to /home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/ffi-1.9.18/gem_make.out
Using builder 3.2.2
Using diff-lcs 1.2.5
Using multi_json 1.10.1
Using multi_test 0.1.1
Using rspec-support 3.0.2
Installing hpricot 0.8.4 with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/hpricot-0.8.4/ext/fast_xs
/usr/local/bin/ruby -r ./siteconf20170628-31921-1tew4bt.rb extconf.rb
checking for stdio.h... * extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
/usr/local/lib/ruby/2.3.0/mkmf.rb:456:intry_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.3.0/mkmf.rb:587:in
try_cpp'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1091:inblock in have_header' from /usr/local/lib/ruby/2.3.0/mkmf.rb:942:in
block in checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:inblock (2 levels) in postpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in
open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:inblock in postpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in
open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:346:inpostpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:941:in
checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1090:inhave_header' from extconf.rb:2:in
' To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/hpricot-0.8.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/hpricot-0.8.4 for inspection.
Results logged to /home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/hpricot-0.8.4/gem_make.out
Using mustache 0.99.4
Using rack 1.4.1
Installing rdiscount 1.6.8 with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/rdiscount-1.6.8/ext
/usr/local/bin/ruby -r ./siteconf20170628-31921-1r3qdcc.rb extconf.rb
checking for random()... * extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/lib
/usr/local/lib/ruby/2.3.0/mkmf.rb:456:intry_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.3.0/mkmf.rb:541:in
try_link0'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:556:intry_link' from /usr/local/lib/ruby/2.3.0/mkmf.rb:765:in
try_func'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1051:inblock in have_func' from /usr/local/lib/ruby/2.3.0/mkmf.rb:942:in
block in checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:inblock (2 levels) in postpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in
open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:inblock in postpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in
open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:346:inpostpone' from /usr/local/lib/ruby/2.3.0/mkmf.rb:941:in
checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1050:inhave_func' from extconf.rb:5:in
' To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/rdiscount-1.6.8/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/adeel/hub/vendor/bundle/ruby/2.3.0/gems/rdiscount-1.6.8 for inspection.
Results logged to /home/adeel/hub/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/rdiscount-1.6.8/gem_make.out
Using tilt 1.3.3
Using bundler 1.12.5
An error occurred while installing ffi (1.9.18), and Bundler cannot continue.
Make sure thatgem install ffi -v '1.9.18'
succeeds before bundling.
Try checking mkmf.log
files as suggested in the output to see what fails. Unless you've compiled software before on this machine, it's possible that you also need to install a package sometimes called build-essentials
which installs general-purpose compilers and build tools.
However: the make install
step only requires all these Ruby dependenices stuff _just to build the man pages_. Otherwise, Ruby is not required at all. If all you're trying to do is build a hub binary, then you can do make
and copy the resulting bin/hub
binary somewhere in your PATH.
Although this is not a fix for the specific issue your having why not use the binary? : https://github.com/github/hub/releases.
The Linux binary should work for 14.04 (I've been successful with 16.04). At least it's worth a try for simplicity's sake.
wget https://github.com/github/hub/releases/download/RELEASE/hub-linux-amd64-VERSION.tgz
tar zxvf hub-linux-amd64-VERSION.tgz -C ~/bin # if only needed for current user (in path)
ln -s ~/bin/hub-linux-amd64-VERSION/bin/hub ~/bin/hub
Confirm success:
$ hub version
git version GIT_VERSION
hub version VERSION
If you then want to alias with git and/or include autocompletion - add to .bashrc:
# alias with git
eval "$(hub alias -s)"
# add autocompletion
if [ -f /home/USER/bin/hub-linux-amd64-VERSION/etc/hub.bash_completion ]; then
. /home/USER/bin/hub-linux-amd64-VERSION/etc//hub.bash_completion
fi
Finally, source .bashrc or start a new terminal session to enable.
@joshmorel Thank you that worked! Closing this issue now.
Most helpful comment
Although this is not a fix for the specific issue your having why not use the binary? : https://github.com/github/hub/releases.
The Linux binary should work for 14.04 (I've been successful with 16.04). At least it's worth a try for simplicity's sake.
Confirm success:
If you then want to alias with git and/or include autocompletion - add to .bashrc:
Finally, source .bashrc or start a new terminal session to enable.