0

I'm trying to run this command on a centos machine :

wget -nv -O/usr/bin/mlr https://github.com/johnkerl/miller/releases/download/v5.10.2/mlr.linux.x86_64 

but i get the following error :

wget: unable to resolve host address ‘github.com’

Does anyone know how to solve this.

TenEM
  • 127
  • 1
  • 8
  • DNS Resolving gone or notexistent? - Try the IPv4 or IPv6 instead – koyaanisqatsi Apr 20 '22 at 19:18
  • @koyaanisqatsi can you explaine more what do you mean by trying IPv4 or IPv6 ? – TenEM Apr 20 '22 at 19:34
  • 1
    Your URL is wrong. There is no x86_64 package. There are `.deb`, `.rpm` and tarball (`.tar.gz`) packages, e.g. [miller-6.2.0-linux-386.tar.gz](https://github.com/johnkerl/miller/releases/download/v6.2.0/miller-6.2.0-linux-386.tar.gz) Determine what package manager your distro uses (`apt`, `rpm`, etc..) and get the proper URL from [ johnkerl / miller/releases](https://github.com/johnkerl/miller/releases). You can use `wget` with that, or just click on the proper link and choose `save`. – David C. Rankin Apr 20 '22 at 19:51
  • @DavidC.Rankin the link works for me it downloads the executable mlr.linux.x86_64 when i run it on a browser i'm using the -O so the file will be truncated immediately, and all downloaded content will be written in /usr/bin/mlr – TenEM Apr 20 '22 at 22:49
  • 1
    When I put your link in a browser, I get `"404 Page Not Found"`. Glad it works in your browser. Going to [johnkerl/miller/releases](https://github.com/johnkerl/miller/releases), there is no `x86_64` package listed. So that link must be an unpublished one in releases. There is a [miller-6.2.0-linux-amd64.tar.gz](https://github.com/johnkerl/miller/releases/download/v6.2.0/miller-6.2.0-linux-amd64.tar.gz) -- which would be the 64bit package. – David C. Rankin Apr 20 '22 at 22:51
  • 1
    Never mind -- you were looking at the old `5.10.2` release, yes there is an `X86_64` package. Sorry about the confusion with the `6.2` release page. You have problems with `wget` because the link above is actually a redirect to a vary long user-content link (posted below) – David C. Rankin Apr 20 '22 at 22:57
  • 1
    Link is a [long redirect to](https://objects.githubusercontent.com/github-production-release-asset-2e65be/35003822/46d9df80-8c2e-11eb-8ad9-81291560e555?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220420T225533Z&X-Amz-Expires=300&X-Amz-Signature=f01e5d00cba6294dde8bee018324545055ceb0ba3d85246725e123af87600021&X-Amz-SignedHeaders=host&actor_id=9997638&key_id=0&repo_id=35003822&response-content-disposition=attachment%3B%20filename%3Dmlr.linux.x86_64&response-content-type=application%2Foctet-stream) – David C. Rankin Apr 20 '22 at 22:58
  • @DavidC.Rankin yes the problem is with wget i tried edditing the nameserver in the /etc/resolv.conf but it still fails. i don't know if theres another command truncated the content and write it in /usr/bin/mlr wile having the file in a local folder like the -O/usr/bin/mlr does – TenEM Apr 20 '22 at 23:13
  • 1
    The file `mlr.linux.x86_64` is an executable file and while you can write it to `/usr/bin` (and then `ln -s /usr/bin/mlr.linux.x86_64 /usr/bin/mlr` to create a `mlr` link capable of being called as normal) -- you really shouldn't. Whatever Linux you are using should have a package manager that installs and keeps track of the files and versions on your system. If you start writing to `/usr/bin` you risk breaking that system by introducing inconsistent files that are not in your package manager database. `wget` has long had problems with redirect links. I was surprised how long it was. – David C. Rankin Apr 20 '22 at 23:27
  • @DavidC.Rankin i'm on centos 7.x machines and really need that exact version when sadly using a yum install for this package it apears that it isn't available for centos 7.x and i couldn't think of anything else but writing to /usr/bin – TenEM Apr 21 '22 at 12:47
  • 1
    Centos is an `.rpm` based distro. If you can't find a 5.10.2 `.rpm` package to install with `yum` you can write a `spec` file fairly easily and create the rpm with `rpmbuild`. That way you can take the executable, make an rpm from it and install the rpm so you don't make your rpm database inconsistent. See [7 Steps to Build a RPM Package from Source on CentOS / RedHat](https://www.thegeekstuff.com/2015/02/rpm-build-package-example/) – David C. Rankin Apr 21 '22 at 15:34
  • 1
    `/usr/local/bin/` is more appropriate than `/usr/bin/` for manually installed programs – Fravadona Apr 26 '22 at 22:32

0 Answers0