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

Can't install on Centos 6. hostname not found #122

Closed
pabgan opened this issue Jul 20, 2018 · 4 comments
Closed

Can't install on Centos 6. hostname not found #122

pabgan opened this issue Jul 20, 2018 · 4 comments
Assignees

Comments

@pabgan
Copy link

pabgan commented Jul 20, 2018

Hello there.

I am trying to install this as explained in here:

 % cat /etc/centos-release                                                                                                                                                                                    
CentOS release 6.10 (Final)

  % sudo yum install yadm                                                                                                                                                                                      
Complementos cargados:fastestmirror, refresh-packagekit, security
Configurando el proceso de instalación
Loading mirror speeds from cached hostfile
 * base: mirror.linuxfix.com
 * epel: linux.mirrors.es.net
 * extras: mirror.scalabledns.com
 * updates: centos.mirror.ndchost.com
Resolviendo dependencias
--> Ejecutando prueba de transacción
---> Package yadm.noarch 0:1.12.0-1.el6 will be instalado
--> Procesando dependencias: hostname para el paquete: yadm-1.12.0-1.el6.noarch
--> Resolución de dependencias finalizada
Error: Paquete: yadm-1.12.0-1.el6.noarch (thelocehiliosan-yadm)
           Necesita: hostname
Podría intentar utilizar el comando --skip-broken para sortear el problema
Podría intentar ejecutar: rpm- Va --nofiles --nodigest

% hostname                                                                                                                                                                                                   
pganuza-dev.xxxxxx.com

% whereis hostname                                                                                                                                                                                           
hostname: /bin/hostname /usr/share/man/man7/hostname.7.gz /usr/share/man/man1/hostname.1.gz

Am I missing something?

Thank you for this beautiful piece of software!

@TheLocehiliosan
Copy link
Owner

Thanks for reporting this. I'ver verified this to be a dependency bug. It looks like CentOS6 is packaging hostname up in the "net-tools" package. I'll have to repackage for CentOS6. In the meantime, a work-around could be to do this:

sudo yum install -y yum-utils git
sudo rpm -Uvh --nodeps $(repoquery --location yadm)

@pabgan
Copy link
Author

pabgan commented Jul 20, 2018 via email

@rasa
Copy link
Contributor

rasa commented Jan 13, 2019

See fix for “hostname not found” in #124

rasa referenced this issue in golang/go Mar 4, 2019
Most notably, it's missing on Windows machines. For example,
windows-amd64-race started failing consistently:

	--- FAIL: BenchmarkExecEcho
	    bench_test.go:15: could not find echo: exec: "echo": executable file not found in %PATH%

We can also reproduce this from Linux with Wine:

	$ GOOS=windows go test -bench=. -benchtime=1x -run=- -exec wine
	--- FAIL: BenchmarkExecEcho
	    bench_test.go:15: could not find echo: exec: "echo": executable file not found in %PATH%

Instead, use the "hostname" program, which is available on Windows too.
Interestingly enough, it's also slightly faster than "echo". Any program
is fine as long as it's close enough to a no-op, though.

	name        old time/op    new time/op    delta
	ExecEcho-8     422µs ± 0%     395µs ± 0%  -6.39%  (p=0.004 n=6+5)

	name        old alloc/op   new alloc/op   delta
	ExecEcho-8    6.39kB ± 0%    6.42kB ± 0%  +0.53%  (p=0.002 n=6+6)

	name        old allocs/op  new allocs/op  delta
	ExecEcho-8      36.0 ± 0%      36.0 ± 0%    ~     (all equal)

Change-Id: I772864d69979172b5cf807552c84d0e165e73051
Reviewed-on: https://go-review.googlesource.com/c/164704
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@TheLocehiliosan
Copy link
Owner

This issues has been resolved in all RPMs hosted in OBS.

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

No branches or pull requests

3 participants