mikefarah / yq

yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor
https://mikefarah.gitbook.io/yq/
MIT License
11.29k stars 565 forks source link

Cannot install yq on Debian #480

Open symbiont-val-melamed opened 4 years ago

symbiont-val-melamed commented 4 years ago

Describe the bug Cannot install yq on Windows - WSL2 Pengwin

version of yq: latest operating system: Windows WSL2 Pengwin (flavor of Debian)

Command Followed the documentation and issued the following commands:

sudo apt install software-properties-common  # well, I had to do this first
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64  # no problem here
sudo add-apt-repository ppa:rmescandon/yq  # here I got the following output:
    # ...
    # gpg: keybox '/tmp/tmp5iju7_st/pubring.gpg' created
    # gpg: /tmp/tmp5iju7_st/trustdb.gpg: trustdb created
    # gpg: key 6657DBE0CC86BB64: public key "Launchpad PPA for Roberto Mier Escandón " imported
    # gpg: Total number processed: 1
    # gpg:               imported: 1
    # gpg: no valid OpenPGP data found.
    # 
sudo apt update
sudo apt install yq -y  # fails with:
    # Reading package lists... Done
    # Building dependency tree
    # Reading state information... Done
    # E: Unable to locate package yq

Actual behavior

sudo apt install yq -y  # fails with:
    # gpg: no valid OpenPGP data found.

Expected behavior

this: should really work
but: it strangely didn't

Additional context Add any other context about the problem here.

varun1231 commented 3 years ago

Having the same issue. I would really like to use this handy tool, @mikefarah! Would be great if you can fix this at the earliest. :)

ghost commented 3 years ago

Is this issue fixed as I get error too.

trinity@L-156205032:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64 [sudo] password for trinity: Executing: /tmp/apt-key-gpghome.q7BOyDORZW/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys CC86BB64 gpg: key 6657DBE0CC86BB64: "Launchpad PPA for Roberto Mier Escandón " not changed gpg: Total number processed: 1 gpg: unchanged: 1

trinity@L-156205032:~$ trinity@L-156205032:~$ sudo add-apt-repository ppa:rmescandon/yq Cannot add PPA: 'ppa:~rmescandon/ubuntu/yq'. ERROR: '~rmescandon' user or team does not exist.

mslinn commented 3 years ago

This is what I got when I attempted to install on Ubuntu 20.10.

$ sudo add-apt-repository ppa:rmescandon/yq
Repository: 'deb http://ppa.launchpad.net/rmescandon/yq/ubuntu/ groovy main'
Description:
yq is a portable command line processor created by Mike Farah

See code at:
https://github.com/mikefarah/yq
More info: https://launchpad.net/~rmescandon/+archive/ubuntu/yq
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Adding deb entry to /etc/apt/sources.list.d/rmescandon-ubuntu-yq-groovy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/rmescandon-ubuntu-yq-groovy.list
Adding key to /etc/apt/trusted.gpg.d/rmescandon-ubuntu-yq.gpg with fingerprint 9A2D61F6BB03CED7522B8E7D6657DBE0CC86BB64
Hit:1 https://prerelease.keybase.io/deb stable InRelease
Hit:2 http://archive.ubuntu.com/ubuntu groovy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu groovy-updates InRelease
Ign:4 http://ppa.launchpad.net/rmescandon/yq/ubuntu groovy InRelease
Hit:5 https://deb.nodesource.com/node_10.x groovy InRelease
Hit:6 http://archive.ubuntu.com/ubuntu groovy-backports InRelease
Hit:7 http://security.ubuntu.com/ubuntu groovy-security InRelease
Hit:8 https://dl.yarnpkg.com/debian stable InRelease
Hit:9 https://packages.microsoft.com/repos/vscode stable InRelease
Ign:10 https://dl.bintray.com/sbt/debian  InRelease
Err:11 http://ppa.launchpad.net/rmescandon/yq/ubuntu groovy Release
  404  Not Found [IP: 91.189.95.85 80]
Ign:12 https://ppa.launchpad.net/webupd8team/atom/ubuntu groovy InRelease
Get:13 https://dl.bintray.com/sbt/debian  Release [815 B]
Err:15 https://ppa.launchpad.net/webupd8team/atom/ubuntu groovy Release
  Certificate verification failed: The certificate is NOT trusted. The name in the certificate does not match the expected.  Could not handshake: Error in the certificate verification. [IP: 91.189.95.85 443]
Hit:14 https://packagecloud.io/AtomEditor/atom/any any InRelease
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/rmescandon/yq/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://ppa.launchpad.net/webupd8team/atom/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Mrcaspento commented 2 years ago

This is my issue currently when I run + apt-get update && apt-install -y yq Ign:1 http://deb.debian.org/debian stretch InRelease Hit:2 http://security.debian.org/debian-security stretch/updates InRelease Hit:3 http://deb.debian.org/debian stretch-updates InRelease Hit:4 http://deb.debian.org/debian stretch Release Ign:5 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish InRelease Ign:7 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish Release Ign:8 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main all Packages Ign:9 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main amd64 Packages Ign:8 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main all Packages Ign:9 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main amd64 Packages Ign:8 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main all Packages Ign:9 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main amd64 Packages Ign:8 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main all Packages Ign:9 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main amd64 Packages Ign:8 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main all Packages Ign:9 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main amd64 Packages Ign:8 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main all Packages Err:9 http://ppa.launchpad.net/rmescandon/yq/ubuntu impish/main amd64 Packages 404 Not Found [IP: 91.189.95.85 80] Reading package lists... W: The repository 'http://ppa.launchpad.net/rmescandon/yq/ubuntu impish Release' does not have a Release file. E: Failed to fetch http://ppa.launchpad.net/rmescandon/yq/ubuntu/dists/impish/main/binary-amd64/Packages 404 Not Found [IP: 91.189.95.85 80] E: Some index files failed to download. They have been ignored, or old ones used instead. In my bitbucket-pipeline it's not downloading the yq package @mikefarah

mikefarah commented 2 years ago

@rmescandon could use your help ^

jwduarteo commented 2 years ago

The https://launchpad.net/api/1.0/~rmescandon/+archive/yq/signing_key_fingerprint gives a different signing key. The key supposes to be C86BB64 not E0CC86BB64 <p> 9A2D61F6BB03CED <wbr/> 7522B8E7D6657DB <wbr/> E0CC86BB64 </p>

jwduarteo commented 2 years ago

nv, I think the result is basically the full key 9A2D61F6BB03CED7522B8E7D6657DBE0CC86BB64 split in 3 parts

robertomier commented 2 years ago

Still an issue? You can see the key 9A2D61F6BB03CED7522B8E7D6657DBE0CC86BB64 at https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=index&search=0x9A2D61F6BB03CED7522B8E7D6657DBE0CC86BB64 all uploaded packages are signed with it. Otherwise they wouldn't be available at launchpad

jainvikas8 commented 2 years ago

This issue is still there.

$ apt install gnupg2 software-properties-common -y (works)
$ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9A2D61F6BB03CED7522B8E7D6657DBE0CC86BB64
Warning: apt-key output should not be parsed (stdout is not a terminal)
Executing: /tmp/apt-key-gpghome.w6BtlWCbCr/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 9A2D61F6BB03CED7522B8E7D6657DBE0CC86BB64
gpg: key 6657DBE0CC86BB64: public key "Launchpad PPA for Roberto Mier Escand�n \xee\x83\xbf" imported
gpg: Total number processed: 1
gpg:               imported: 1
$ add-apt-repository ppa:rmescandon/yq
 yq is a portable command line processor created by Mike Farah
See code at:
https://github.com/mikefarah/yq
 More info: https://launchpad.net/~rmescandon/+archive/ubuntu/yq
gpg: keybox '/tmp/tmp7b9ooao9/pubring.gpg' created
gpg: /tmp/tmp7b9ooao9/trustdb.gpg: trustdb created
gpg: key 6657DBE0CC86BB64: public key "Launchpad PPA for Roberto Mier Escandón " imported
gpg: Total number processed: 1
gpg:               imported: 1
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
$ apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Ign:2 http://ppa.launchpad.net/rmescandon/yq/ubuntu jammy InRelease
Hit:3 http://deb.debian.org/debian buster InRelease
Err:4 http://ppa.launchpad.net/rmescandon/yq/ubuntu jammy Release
  404  Not Found [IP: 91.189.95.85 80]
Hit:5 http://deb.debian.org/debian buster-updates InRelease
Reading package lists...
E: The repository 'http://ppa.launchpad.net/rmescandon/yq/ubuntu jammy Release' does not have a Release file.

Seems there is no release file for this.

I'm trying to install this as a package on GitLab CI

robertomier commented 2 years ago

mm... i see a 503 when trying to reach the key at here. Not sure if that's temporary

jainvikas8 commented 2 years ago

mm... i see a 503 when trying to reach the key at here. Not sure if that's temporary

The only way I can get around this problem is by replacing

add-apt-repository 'deb https://ppa.launchpadcontent.net/rmescandon/yq/ubuntu focal main'

The instructions need to be updated and the release file to be added.

Or Is it jammy release?

robertomier commented 2 years ago

ah, wait. You're in a non-LTS. I been updating only for LTS ones and the last is focal fossa, yes. Jammy will be ready once jammy is offically released on next month. In any case, I've just moved focal binary to jammy series in the ppa. Give it a go again in some minutes (not sure how it uses to last until ready. Still pending)

ApoorvaPasbola commented 2 years ago

I was also having the same 404 error later found out its just for some specific versions of yq. Version given in the readme (v4.2.0) works for me :)

chunjiw commented 1 year ago

I have this issue as well. Have to stop using Debian and probably would use Arch instead. Apt has been disappointing for day-to-day work. I guess apt only shines for making a server stable.

reitzig commented 5 months ago

Can't speak for @mikefarah , but it seems to that issues with installing yq from a 3rd-party PPA in WSL is mildly out of scope here.

FWIW, here's how I install yq on Debian (speaking in termins of Dockerfile):

# renovate: datasource=github-releases depName=mikefarah/yq versioning=semver
ENV YQ_VERSION="v4.40.5"
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 \
 && chmod +x /usr/local/bin/yq

Should work in pretty much the same way on any system.