Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install #30

Open
saturnflyer opened this issue Aug 30, 2019 · 6 comments
Open

Unable to install #30

saturnflyer opened this issue Aug 30, 2019 · 6 comments

Comments

@saturnflyer
Copy link

I'm setting up a new machine and running into trouble installing this. I suspect it may point to a problem on my machine but I wanted to check here for any insight.

I have docker installed on macOS (not the docker.app) and running but installing codeclimate raises an error about id: illegal option -- -

> brew install codeclimate
==> Installing codeclimate from codeclimate/formulae
==> Downloading https://github.com/codeclimate/codeclimate/archive/v0.85.5.tar.gz
Already downloaded: /Users/jgay/Library/Caches/Homebrew/downloads/b36c823bf8d0c5985359b8d4976cc573593a77614e09ab2462880ecb5649a9cc--codeclimate-0.85.5.tar.gz
==> make install
Last 15 lines from /Users/jgay/Library/Logs/Homebrew/codeclimate/01.make:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Unable to run `docker version', the docker daemon may not be running
id: illegal option -- -
usage: id [user]
       id -A
       id -F [user]
       id -G [-n] [user]
       id -M
       id -P [user]
       id -g [-nr] [user]
       id -p [user]
       id -u [-nr] [user]
bin/check: line 11: [: : integer expression expected
Please ensure `docker version' succeeds and try again
make: *** [install] Error 1

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/codeclimate/homebrew-formulae/issues

> docker version
Client: Docker Engine - Community
 Version:           18.09.7
 API version:       1.37 (downgraded from 1.39)
 Go version:        go1.12.6
 Git commit:        2d0083d
 Built:             Thu Jun 27 22:52:31 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.04.0-ce
  API version:      1.37 (minimum version 1.12)
  Go version:       go1.9.4
  Git commit:       3d479c0
  Built:            Tue Apr 10 18:18:40 2018
  OS/Arch:          linux/amd64
  Experimental:     false
@saturnflyer
Copy link
Author

Adding some more details. I went to the homebrew downloads and manually installed this with success:

> tar -xzvf b36c823bf8d0c5985359b8d4976cc573593a77614e09ab2462880ecb5649a9cc--codeclimate-0.85.5.tar.gz
x codeclimate-0.85.5/
x codeclimate-0.85.5/.circleci/
x codeclimate-0.85.5/.circleci/config.yml
x codeclimate-0.85.5/.codeclimate.yml
x codeclimate-0.85.5/.dockerignore
x codeclimate-0.85.5/.gitignore
x codeclimate-0.85.5/.rubocop.yml
x codeclimate-0.85.5/.ruby-style.yml
x codeclimate-0.85.5/.ruby-version
x codeclimate-0.85.5/DEVELOPERS.md
x codeclimate-0.85.5/Dockerfile
x codeclimate-0.85.5/Gemfile
x codeclimate-0.85.5/Gemfile.lock
x codeclimate-0.85.5/ISSUE_TEMPLATE.md
x codeclimate-0.85.5/LICENSE
x codeclimate-0.85.5/Makefile
x codeclimate-0.85.5/README.md
x codeclimate-0.85.5/Rakefile
x codeclimate-0.85.5/VERSION
x codeclimate-0.85.5/WERE_HIRING.md
x codeclimate-0.85.5/benchmarks/
x codeclimate-0.85.5/benchmarks/path_tree_benchmark.rb
x codeclimate-0.85.5/bin/
x codeclimate-0.85.5/bin/check
x codeclimate-0.85.5/bin/codeclimate
x codeclimate-0.85.5/bin/prep-release
x codeclimate-0.85.5/bin/release
x codeclimate-0.85.5/bin/validate-release
x codeclimate-0.85.5/codeclimate-wrapper
x codeclimate-0.85.5/codeclimate.gemspec
x codeclimate-0.85.5/config/
x codeclimate-0.85.5/config/engines.yml
x codeclimate-0.85.5/lib/
x codeclimate-0.85.5/lib/cc/
x codeclimate-0.85.5/lib/cc/analyzer.rb
x codeclimate-0.85.5/lib/cc/analyzer/
x codeclimate-0.85.5/lib/cc/analyzer/bridge.rb
x codeclimate-0.85.5/lib/cc/analyzer/composite_container_listener.rb
x codeclimate-0.85.5/lib/cc/analyzer/container.rb
x codeclimate-0.85.5/lib/cc/analyzer/container/
x codeclimate-0.85.5/lib/cc/analyzer/container/result.rb
x codeclimate-0.85.5/lib/cc/analyzer/container_listener.rb
x codeclimate-0.85.5/lib/cc/analyzer/engine.rb
x codeclimate-0.85.5/lib/cc/analyzer/engine_output.rb
x codeclimate-0.85.5/lib/cc/analyzer/engine_output_filter.rb
x codeclimate-0.85.5/lib/cc/analyzer/engine_output_overrider.rb
x codeclimate-0.85.5/lib/cc/analyzer/filesystem.rb
x codeclimate-0.85.5/lib/cc/analyzer/formatters.rb
x codeclimate-0.85.5/lib/cc/analyzer/formatters/
x codeclimate-0.85.5/lib/cc/analyzer/formatters/formatter.rb
x codeclimate-0.85.5/lib/cc/analyzer/formatters/html_formatter.rb
x codeclimate-0.85.5/lib/cc/analyzer/formatters/json_formatter.rb
x codeclimate-0.85.5/lib/cc/analyzer/formatters/plain_text_formatter.rb
x codeclimate-0.85.5/lib/cc/analyzer/formatters/spinner.rb
x codeclimate-0.85.5/lib/cc/analyzer/formatters/templates/
x codeclimate-0.85.5/lib/cc/analyzer/formatters/templates/html.erb
x codeclimate-0.85.5/lib/cc/analyzer/issue.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_sorter.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/category_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/check_name_presence_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/content_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/description_presence_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/location_format_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/other_locations_format_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/path_existence_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/path_is_file_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/path_presence_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/relative_path_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/remediation_points_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/severity_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/type_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validations/validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/issue_validator.rb
x codeclimate-0.85.5/lib/cc/analyzer/location_description.rb
x codeclimate-0.85.5/lib/cc/analyzer/logging_container_listener.rb
x codeclimate-0.85.5/lib/cc/analyzer/measurement.rb
x codeclimate-0.85.5/lib/cc/analyzer/measurement_validations.rb
x codeclimate-0.85.5/lib/cc/analyzer/measurement_validations/
x codeclimate-0.85.5/lib/cc/analyzer/measurement_validations/name_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/measurement_validations/type_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/measurement_validations/validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/measurement_validations/value_validation.rb
x codeclimate-0.85.5/lib/cc/analyzer/measurement_validator.rb
x codeclimate-0.85.5/lib/cc/analyzer/mounted_path.rb
x codeclimate-0.85.5/lib/cc/analyzer/raising_container_listener.rb
x codeclimate-0.85.5/lib/cc/analyzer/source_buffer.rb
x codeclimate-0.85.5/lib/cc/analyzer/source_extractor.rb
x codeclimate-0.85.5/lib/cc/analyzer/source_fingerprint.rb
x codeclimate-0.85.5/lib/cc/analyzer/statsd_container_listener.rb
x codeclimate-0.85.5/lib/cc/analyzer/validator.rb
x codeclimate-0.85.5/lib/cc/cli.rb
x codeclimate-0.85.5/lib/cc/cli/
x codeclimate-0.85.5/lib/cc/cli/analyze.rb
x codeclimate-0.85.5/lib/cc/cli/analyze/
x codeclimate-0.85.5/lib/cc/cli/analyze/engine_failure.rb
x codeclimate-0.85.5/lib/cc/cli/command.rb
x codeclimate-0.85.5/lib/cc/cli/console.rb
x codeclimate-0.85.5/lib/cc/cli/engines.rb
x codeclimate-0.85.5/lib/cc/cli/engines/
x codeclimate-0.85.5/lib/cc/cli/engines/engine_command.rb
x codeclimate-0.85.5/lib/cc/cli/engines/install.rb
x codeclimate-0.85.5/lib/cc/cli/engines/list.rb
x codeclimate-0.85.5/lib/cc/cli/file_store.rb
x codeclimate-0.85.5/lib/cc/cli/global_cache.rb
x codeclimate-0.85.5/lib/cc/cli/global_config.rb
x codeclimate-0.85.5/lib/cc/cli/help.rb
x codeclimate-0.85.5/lib/cc/cli/output.rb
x codeclimate-0.85.5/lib/cc/cli/prepare.rb
x codeclimate-0.85.5/lib/cc/cli/runner.rb
x codeclimate-0.85.5/lib/cc/cli/validate_config.rb
x codeclimate-0.85.5/lib/cc/cli/version.rb
x codeclimate-0.85.5/lib/cc/cli/version_checker.rb
x codeclimate-0.85.5/lib/cc/config.rb
x codeclimate-0.85.5/lib/cc/config/
x codeclimate-0.85.5/lib/cc/config/checks_adapter.rb
x codeclimate-0.85.5/lib/cc/config/default_adapter.rb
x codeclimate-0.85.5/lib/cc/config/engine.rb
x codeclimate-0.85.5/lib/cc/config/engine_set.rb
x codeclimate-0.85.5/lib/cc/config/json_adapter.rb
x codeclimate-0.85.5/lib/cc/config/prepare.rb
x codeclimate-0.85.5/lib/cc/config/validation/
x codeclimate-0.85.5/lib/cc/config/validation/check_validator.rb
x codeclimate-0.85.5/lib/cc/config/validation/engine_validator.rb
x codeclimate-0.85.5/lib/cc/config/validation/fetch_validator.rb
x codeclimate-0.85.5/lib/cc/config/validation/file_validator.rb
x codeclimate-0.85.5/lib/cc/config/validation/hash_validations.rb
x codeclimate-0.85.5/lib/cc/config/validation/json.rb
x codeclimate-0.85.5/lib/cc/config/validation/prepare_validator.rb
x codeclimate-0.85.5/lib/cc/config/validation/yaml.rb
x codeclimate-0.85.5/lib/cc/config/yaml_adapter.rb
x codeclimate-0.85.5/lib/cc/engine_registry.rb
x codeclimate-0.85.5/lib/cc/resolv.rb
x codeclimate-0.85.5/lib/cc/workspace.rb
x codeclimate-0.85.5/lib/cc/workspace/
x codeclimate-0.85.5/lib/cc/workspace/exclusion.rb
x codeclimate-0.85.5/lib/cc/workspace/path_tree.rb
x codeclimate-0.85.5/lib/cc/workspace/path_tree/
x codeclimate-0.85.5/lib/cc/workspace/path_tree/dir_node.rb
x codeclimate-0.85.5/lib/cc/workspace/path_tree/file_node.rb
x codeclimate-0.85.5/spec/
x codeclimate-0.85.5/spec/cc/
x codeclimate-0.85.5/spec/cc/analyzer/
x codeclimate-0.85.5/spec/cc/analyzer/bridge_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/composite_container_listener_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/container_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/engine_output_filter_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/engine_output_overrider_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/engine_output_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/engine_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/filesystem_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/formatters/
x codeclimate-0.85.5/spec/cc/analyzer/formatters/html_formatter_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/formatters/json_formatter_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/formatters/plain_text_formatter_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_sorter_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/category_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/check_name_presence_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/content_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/description_presence_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/location_format_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/other_locations_format_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/path_existence_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/path_is_file_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/path_presence_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/relative_path_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/remediation_points_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/severity_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations/type_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validations_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/issue_validator_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/location_description_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/logging_container_listener_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/measurement_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/measurement_validations/
x codeclimate-0.85.5/spec/cc/analyzer/measurement_validations/name_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/measurement_validations/type_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/measurement_validations/value_validation_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/measurement_validations_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/measurement_validator_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/raising_container_listener_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/source_buffer_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/source_extractor_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/source_fingerprint_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer/statsd_container_listener_spec.rb
x codeclimate-0.85.5/spec/cc/analyzer_spec.rb
x codeclimate-0.85.5/spec/cc/cli/
x codeclimate-0.85.5/spec/cc/cli/analyze_spec.rb
x codeclimate-0.85.5/spec/cc/cli/command_spec.rb
x codeclimate-0.85.5/spec/cc/cli/engines/
x codeclimate-0.85.5/spec/cc/cli/engines/install_spec.rb
x codeclimate-0.85.5/spec/cc/cli/engines/list_spec.rb
x codeclimate-0.85.5/spec/cc/cli/file_store_spec.rb
x codeclimate-0.85.5/spec/cc/cli/global_cache_spec.rb
x codeclimate-0.85.5/spec/cc/cli/global_config_spec.rb
x codeclimate-0.85.5/spec/cc/cli/help_spec.rb
x codeclimate-0.85.5/spec/cc/cli/prepare_spec.rb
x codeclimate-0.85.5/spec/cc/cli/runner_spec.rb
x codeclimate-0.85.5/spec/cc/cli/validate_config_spec.rb
x codeclimate-0.85.5/spec/cc/cli/version_checker_spec.rb
x codeclimate-0.85.5/spec/cc/config/
x codeclimate-0.85.5/spec/cc/config/checks_adapter_spec.rb
x codeclimate-0.85.5/spec/cc/config/default_adapter_spec.rb
x codeclimate-0.85.5/spec/cc/config/engine_set_spec.rb
x codeclimate-0.85.5/spec/cc/config/engine_spec.rb
x codeclimate-0.85.5/spec/cc/config/json_adapter_spec.rb
x codeclimate-0.85.5/spec/cc/config/prepare_spec.rb
x codeclimate-0.85.5/spec/cc/config/validation/
x codeclimate-0.85.5/spec/cc/config/validation/json_spec.rb
x codeclimate-0.85.5/spec/cc/config/validation/yaml_spec.rb
x codeclimate-0.85.5/spec/cc/config/yaml_adapter_spec.rb
x codeclimate-0.85.5/spec/cc/config_spec.rb
x codeclimate-0.85.5/spec/cc/engine_registry_spec.rb
x codeclimate-0.85.5/spec/cc/resolv_spec.rb
x codeclimate-0.85.5/spec/cc/workspace/
x codeclimate-0.85.5/spec/cc/workspace/exclusion_spec.rb
x codeclimate-0.85.5/spec/cc/workspace/path_tree_spec.rb
x codeclimate-0.85.5/spec/cc/workspace_spec.rb
x codeclimate-0.85.5/spec/fixtures/
x codeclimate-0.85.5/spec/fixtures/source.rb
x codeclimate-0.85.5/spec/fixtures/source2.rb
x codeclimate-0.85.5/spec/spec_helper.rb
x codeclimate-0.85.5/spec/support/
x codeclimate-0.85.5/spec/support/engine_list_matcher.rb
x codeclimate-0.85.5/spec/support/factory.rb
x codeclimate-0.85.5/spec/support/file_system_helpers.rb
x codeclimate-0.85.5/spec/support/proc_helpers.rb
x codeclimate-0.85.5/spec/support/resolv_helpers.rb
x codeclimate-0.85.5/spec/support/test_container.rb
x codeclimate-0.85.5/spec/support/test_container_listener.rb
x codeclimate-0.85.5/spec/support/test_formatter.rb
jgay in ~/Library/Caches/Homebrew/downloads  > open .
jgay in ~/Library/Caches/Homebrew/downloads  > cd codeclimate-0.85.5 
jgay in ~/Library/Caches/Homebrew/downloads/codeclimate-0.85.5  > make install
chruby: unknown Ruby: 2.5.3
bin/check
docker pull codeclimate/codeclimate:latest
latest: Pulling from codeclimate/codeclimate
e7c96db7181b: Pull complete 
53a259fc34ca: Pull complete 
71a21a84b919: Pull complete 
1912ff340d50: Pull complete 
09213d22b60f: Pull complete 
ad723155f197: Pull complete 
8a301e9d4952: Pull complete 
b3696a9f63b6: Pull complete 
2f87bdbdb108: Pull complete 
7444d66275b5: Pull complete 
Digest: sha256:6798eda0b248d6fb85d831553ba3300271d88d7efa5a0d987b0049baf9096795
Status: Downloaded newer image for codeclimate/codeclimate:latest
mkdir -p /usr/local/bin
install -m 0755 codeclimate-wrapper /usr/local/bin/codeclimate

@filipesperandio
Copy link
Contributor

Hey @saturnflyer!
What you get from docker version?
It seems like the errors cascaded from not getting a proper response from that command.

@saturnflyer
Copy link
Author

@filipesperandio I've got it in the original comment

> docker version
Client: Docker Engine - Community
 Version:           18.09.7
 API version:       1.37 (downgraded from 1.39)
 Go version:        go1.12.6
 Git commit:        2d0083d
 Built:             Thu Jun 27 22:52:31 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.04.0-ce
  API version:      1.37 (minimum version 1.12)
  Go version:       go1.9.4
  Git commit:       3d479c0
  Built:            Tue Apr 10 18:18:40 2018
  OS/Arch:          linux/amd64
  Experimental:     false

@filipesperandio
Copy link
Contributor

Right, missed it.
When you say you have not the Docker app installed, what you mean exactly?

I would also check on coreutils versions and if you PATH is exporting to subshells everything you see on an interactive shell.

It could also have been something simpler, just noticed this:
...the docker daemon may not be running which actually causes docker version to exit with error code, and fail the installation.

@devProdigy
Copy link

If installing docker with brew install docker --cask on Mac - I see same issue.
I run docker version and see that daemon is running. Then run brew install codeclimate and see same as above:

Last 15 lines from .../Library/Logs/Homebrew/codeclimate/01.make:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Unable to run `docker version', the docker daemon may not be running
id: illegal option -- -
usage: id [user]
       id -A
       id -F [user]
       id -G [-n] [user]

       id -P [user]
       id -g [-nr] [user]
       id -p [user]
       id -u [-nr] [user]
bin/check: line 11: [: : integer expression expected
Please ensure `docker version' succeeds and try again
make: *** [install] Error 1

Maybe I should reinstall docker and install without desktop version.

@eric-hemasystems
Copy link

I got this as well. The key line for me was this:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock

That is not where my docker socket is located at. I'm using colima so it's at /Users/me/.colima/default/docker.sock. I can see this by running colima status. If you are using alt container runtime (such as Colima) this might be your issue as well. I'm guessing Homebrew runs is some sort of more isolated environment where it no longer knows the socket location?

Anyway, I solve this by just creating a symlink to make it work:

sudo ln -s /Users/me/.colima/default/docker.sock /var/run/docker.sock

After doing this running brew install codeclimate works like a charm (although it slow as Christmas because they still haven't added support for multi-arch yet so it runs via qemu making CodeClimate still mostly unusable on a Mac. But it's progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants