Julien-cpsn / ATAC

A simple API client (postman like) in your terminal
https://atac.julien-cpsn.com/
MIT License
2.02k stars 86 forks source link

Install from Homebrew is not working #16

Closed alecthegeek closed 7 months ago

alecthegeek commented 7 months ago

I am using an M1 based Macbook

  1. When installing from homebrew I had to manually add the execute bit.

     chmod +x  /opt/homebrew/Cellar/atac/0.11.3/bin/atac
  2. The binary is for X64 rather than ARM so I can't run it

(PS -- This looks like a cool tool so will install from binary for now)

donovanhubbard commented 7 months ago

I've experienced this on both my intel mac book and my m1 mac book. Both of them returned the error

~ atac
zsh: exec format error: atac
# from m1 macbook
file atac
atac: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, not stripped
Julien-cpsn commented 7 months ago

I think that problems comes from the binary I put in my homebrew script. Currently the only one that has been working for is unknown-linux-musl, but since I don't have a mac maybe it doesn't work at all on those devices. I have been searching how to put binaries for many distribution in my homebrew but I do not find anything at all... If you guys know, I am willing to understand how!

PS: heres the "script" https://github.com/Julien-cpsn/homebrew-atac/blob/main/Formula/atac.rb

ccoVeille commented 7 months ago

Some tap are not using the binary but launch the cargo install

https://github.com/hendrikmaus/homebrew-tap/blob/main/Formula%2Frust-workflows.rb

Here is also an article https://superuser.com/questions/1793635/how-to-publish-binary-executables-as-homebrew-taps-for-both-macos-and-linux

ccoVeille commented 7 months ago

I may have misunderstood something anyway.

But it seems to me there is something to around what they call a "bottle"

aldreth commented 7 months ago

I think that problems comes from the binary I put in my homebrew script. Currently the only one that has been working for is unknown-linux-musl, but since I don't have a mac maybe it doesn't work at all on those devices. I have been searching how to put binaries for many distribution in my homebrew but I do not find anything at all... If you guys know, I am willing to understand how!

PS: heres the "script" https://github.com/Julien-cpsn/homebrew-atac/blob/main/Formula/atac.rb

It looks like this cargo tool could be useful https://github.com/axodotdev/cargo-dist

ccoVeille commented 7 months ago

Indeed https://opensource.axo.dev/cargo-dist/book/installers/homebrew.html

Julien-cpsn commented 7 months ago

Hello guys,

I think I fixed it Please try to install it again.

Here is brew Formula: https://github.com/Julien-cpsn/homebrew-atac/blob/main/Formula/atac.rb

alecthegeek commented 7 months ago

Still not working for me (M1 Macbook)

$ file   /opt/homebrew/Cellar/atac/0.12.0/bin/atac
/opt/homebrew/Cellar/atac/0.12.0/bin/atac: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, not stripped

:-(

ccoVeille commented 7 months ago

@alecthegeek how can you have 0.12.0 while it's the 0.13.0 that is available ?

did you launch the following command ?

brew upgrade atac

Julien-cpsn commented 7 months ago

@alecthegeek hmm, I've just udpdated the app version to 0.13.0 and your comments talks about the v0.12.0. Maybe try to uninstall entirelly and install it again? or just update it?

ccoVeille commented 7 months ago

@Julien-cpsn for records, I just upgrade via brew, and I got the 1.13.0 and the binary is working

Julien-cpsn commented 7 months ago

@Julien-cpsn for records, I just upgrade via brew, and I got the 1.13.0 and the binary is working

Yes same, I tried before posting. But well we use Linux 👀

ccoVeille commented 7 months ago

@alecthegeek If you want to replicate you could launch this and copy and paste the results here

brew info atac
file $(realpath $(which))
alecthegeek commented 7 months ago

Ah Ha.

A brew update fixed it!

Sorry about that.

Also not sure if this info is useful

https://docs.brew.sh/Formula-Cookbook#handling-different-system-configurations

Julien-cpsn commented 7 months ago

Ah Ha.

A brew update fixed it!

@alecthegeek so everything works fine?? I am happily surprised haha

Also not sure if this info is useful

https://docs.brew.sh/Formula-Cookbook#handling-different-system-configurations

Yes I have red through that but the problem was handling many tar archives which is not documented

alecthegeek commented 7 months ago

Looks like success to me. I will close the ticket.

Merci bien

image