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

Failure to install using go install #3017

Closed
ryoha000 opened this issue Jul 20, 2024 · 4 comments
Closed

Failure to install using go install #3017

ryoha000 opened this issue Jul 20, 2024 · 4 comments
Milestone

Comments

@ryoha000
Copy link

ryoha000 commented Jul 20, 2024

Description

I encountered an issue when trying to install aqua using the following command:

$ go install github.com/aquaproj/aqua/v2/cmd/aqua@latest

The installation fails with the following error message:

go: github.com/aquaproj/aqua/v2/cmd/aqua@latest (in github.com/aquaproj/aqua/v2@v2.30.0):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

I believe the cause of this issue is the replace directive present in the current go.mod file in the main branch. The specific line is:

replace github.com/urfave/cli/v2 v2.27.2 => github.com/urfave/cli/v2 v2.27.3-0.20240629214313-84c536d83870

Steps to Reproduce

Run the following command in the terminal:

go install github.com/aquaproj/aqua/v2/cmd/aqua@latest

Environment

go version: go1.22.5
os: Ubuntu 20.04.3
cpu: x86_64

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Jul 20, 2024

Thank you for your report.
The replace directive was introduced to solve the issue of shell completion.

I fixed the issue of urfave/cli/v2, but the fix hasn't been released yet, so we need to use replace directive.

Could you install aqua by another way?

https://aquaproj.github.io/docs/install

@ryoha000
Copy link
Author

Thank you for your prompt response and the detailed explanation.

I have successfully installed aqua using an alternative method as suggested in the documentation. My primary intention was to report that the installation method using go install, which is currently documented, does not work due to the replace directive issue.

Thank you again for your assistance and for your continued efforts to improve aqua.

@suzuki-shunsuke
Copy link
Member

This issue will be solved at the next release.

urfave/cli/v2 v2.27.3 was out, so we don't have to use replace directive anymore.

@suzuki-shunsuke
Copy link
Member

@suzuki-shunsuke suzuki-shunsuke added this to the v2.31.0 milestone Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants