Comments (24)
I'm currently getting the same error with the brew install
imageoptim-cli: The x86_64 architecture is required for this software.
from imageoptim-cli.
@inspiredearth @matthewferry @jwryan9 @shuguenot @sebastienbarre I have updated the version of node.js which imageoptim is built with to 12.18.2
, hopefully this will solve this issue.
This is in [email protected]
which has just been released, it might take some time before it appears on homebrew (I don't control that).
from imageoptim-cli.
@sammcj, which part of the issue "Unable to install on M1 / Apple Silicon" you think is not closed/resolved?
Feel free to open a new issue if you want.
And have you visited the linked issue? It seems like you're not really reading what I wrote, nor understanding what is really the issue at hand. And given your attitude I'll refrain from commenting here further.
from imageoptim-cli.
Thanks.
I just cloned the repo to test it out manually.
- I tried the old 3.0.2, and indeed it failed at
yarn install
, same error as seen with Homebrew. What I didn't realize is thatyarn build
does work and produces a binary, but since the previous step failed, Homebrew had already given up. - I then switched to the 3.0.7 tag you just released, and
yarn install
now succeeds (and so doesyarn build
). So this is looking good for Homebrew, thanks for fixing that.
from imageoptim-cli.
@sammcj, I know you're confused, but this issue is about installing on Apple Silicon, not running it natively. People above showed that it can be installed, so indeed this issue is resolved.
The comment I made is about the brew formula. The maintainer here tried to fix it, but clearly wasn't very familiar with homebrew. And technically it is an issue for homebrew, not this repo (homebrew formula are individually maintained, sometimes by the same developer of the software, but most of the time not, as in any other package index.)
Regarding running it natively, probably you should worry more about this issue: ImageOptim/ImageOptim#334
Lastly, it is easy to ask for people to "just recompile for arm64". But remember this is all free softwares developed by people in their free time and volunteer to release it with an open source license. Most these licenses come with a clause saying that the software has no warranty. They have no obligation at all to do those volunteer work. So just be nice and stop behaving like a consumer.
from imageoptim-cli.
Friendly bump: We're ~9 months on since last activity here, but this is still an issue.
When I attempt to brew install imageoptim-cli
on Apple Silicon (M2), I get the message:
$ brew install imageoptim-cli
[…snip…]
imageoptim-cli: The x86_64 architecture is required for this software.
Error: imageoptim-cli: An unsatisfied requirement failed this build.
The version pulled down by yarn seems to run fine:
$ yarn add imageoptim-cli
[…snip…]
✨ Done in 0.50s.
$ node_modules/imageoptim-cli/dist/imageoptim --version
3.0.7
What, specifically, are the blockers to updating the homebrew formula?
from imageoptim-cli.
Also don't work for me:
> brew install imageoptim-cli
imageoptim-cli: The x86_64 architecture is required for this software.
Error: imageoptim-cli: An unsatisfied requirement failed this build.
maybe this should be reopen?
from imageoptim-cli.
@janosh yes, runs without issue.
$ imageoptim --imagealpha --quality 0-100 --number-of-colors 32 example.PNG
i Running ImageAlpha...
i Running ImageOptim...
✓ example.PNG was: 474kB now: 47.7kB saving: 426kB (89.93%)
✓ TOTAL was: 474kB now: 47.7kB saving: 426kB (89.93%)
✓ Finished
$ which imageoptim
/Users/levi/.npm-global/bin/imageoptim
$ ls -lah /Users/levi/.npm-global/bin/imageoptim
lrwxr-xr-x 1 levi staff 54 Feb 15 12:52 /Users/levi/.npm-global/bin/imageoptim -> ../../.config/yarn/global/node_modules/.bin/imageoptim*
$ arch
arm64
from imageoptim-cli.
Yep.
from imageoptim-cli.
@Spomsoree, if you follow Homebrew/homebrew-core#96368 then you'll see the patch isn't accepted, and is made under the assumption that you can run it through rosetta 2.
So in short, it can't be run native yet, but you can run it through rosetta 2. In order to do this, follow Homebrew/brew#9173
from imageoptim-cli.
@ickc that's a bit petty / high and mighty, I'm an OSS maintainer as well. While I appreciate what you're saying in general - I didn't like a consumer - I just stated that it's not fixed and needs to be compiled for ARM plain and simple 🤷
from imageoptim-cli.
Also don't work for me:
> brew install imageoptim-cli imageoptim-cli: The x86_64 architecture is required for this software. Error: imageoptim-cli: An unsatisfied requirement failed this build.maybe this should be reopen?
Ask far as I've understood from the responses to this thread (started be me), it was determined (here) that since it can be installed if Homebrew is installed in Rosetta mode, the issue is resolved.
I have been using Homebrew for a few years in native Silicon mode, and having to reinstall my Homebrew and all packages (in Rosetta mode) seems like too much hassle just to get imageoptim-cli working. So I've moved on from trying to use imageoptim-cli via Homebrew.
I understand from comments in this discussion that we can install Yarn (a Javascript package manager) via Homebrew (or via Shell script), and then install imageoptim-cli
with yarn
. I've not yet tried that.
from imageoptim-cli.
Tangential, but based on this pull request, it looks like imageoptim not being updated is blocking the homebrew formula from being updated.
from imageoptim-cli.
What needs to be done to update the homebrew formula? Still seeing 3.0.2 and unable to install on Apple silicon https://formulae.brew.sh/formula/imageoptim-cli#default
from imageoptim-cli.
I've not had any time to check but I suspect the package needs building for a different version of node.js than it is currently or it seems like maybe homebrew also supports linux now(?) and, if that's the case, could be related to this package being mac only.
from imageoptim-cli.
https://formulae.brew.sh/formula/imageoptim-cli is now 3.0.7
but I still don't see support for Apple Silicon mentioned there, and of course it doesn't install:
imageoptim-cli: The x86_64 architecture is required for this software.
Error: imageoptim-cli: An unsatisfied requirement failed this build.
Installing via NPM is no different:
zsh: bad CPU type in executable: imageoptim
from imageoptim-cli.
get the same as above for homebrew, but I was able to install imageoptim-cli
via Yarn without issue on Apple Silicon.
$ yarn global add imageoptim-cli
yarn global v1.22.17
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Installed "[email protected]" with binaries:
- imageoptim
✨ Done in 5.25s.
Looks like the homebrew formula needs to be updated: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/imageoptim-cli.rb#L23
from imageoptim-cli.
@levibuzolic Does it actually run after yarn
installation?
from imageoptim-cli.
@levibuzolic Thanks! Can you confirm that it's using Rosetta?
from imageoptim-cli.
Anything I need to do for this? I don't own an M1 Mac.
from imageoptim-cli.
Similar issues to above, but with Yarn I get:
$ imageoptim --imagealpha --quality 0-100 --number-of-colors 32 example.PNG
zsh: bad CPU type in executable: imageoptim
$ which imageoptim
/Users/jason/.yarn/bin/imageoptim
$ ls -lah /Users/jason/.yarn/bin/imageoptim
lrwxr-xr-x 1 jason staff 54B 10 Oct 17:25 /Users/jason/.yarn/bin/imageoptim -> ../../.config/yarn/global/node_modules/.bin/imageoptim
$ arch
arm64
EDIT: turns out, I hadn’t installed rosetta yet – all good after this.
softwareupdate --install-rosetta
from imageoptim-cli.
Just hit this problem as well - it's definitely not resolved @JamieMason.
Note - If you use it with Rosetta it'll run in emulation mode which is not efficient, the software needs to be compiled for ARM.
from imageoptim-cli.
it looks like it is not installing the arm native artifact
imageoptim-cli
* Binaries built for a non-native architecture were installed into imageoptim-cli's prefix.
The offending files are:
/opt/homebrew/Cellar/imageoptim-cli/3.1.7/libexec/lib/node_modules/imageoptim-cli/dist/imageoptim
See this PR, Homebrew/homebrew-core#135595
The build log is in here, https://github.com/Homebrew/homebrew-core/actions/runs/5437629545/jobs/9888363914
from imageoptim-cli.
Yeah running software in emulation is a workaround/hack especially for something that's processor or GPU intensive, but I'm aware Jamie is doing a complete rewrite of imageOptim so probably isn't investing time in the current codebase.
from imageoptim-cli.
Related Issues (20)
- Supported file types are case sensitive HOT 2
- Command failed with exit code when using ImageAlpha (works great without it) HOT 5
- multiple invocations collide in tmpdir, crash HOT 2
- crash on malformed png files
- imageoptim: cannot execute binary file: Exec format error HOT 4
- JPEGmini is not installed HOT 1
- A Github Action that automatically compresses JPEGs, PNGs and WebPs in Pull Requests. HOT 3
- when git merge,pre commit would operate once more npx imageoptim,how to ignore this condition?
- Linked website gives 404 HOT 4
- Manipulating stats with additional args HOT 1
- Parentheses in filenames are not recognized HOT 2
- Animated PNG Compression HOT 1
- Add an option to compress images with lossy minifcations HOT 1
- Latest version can't be installed on NodeJS 20.x when setting engine-strict=true in ~/.npmrc HOT 3
- Youtube video in readme summary set to private HOT 1
- Latest version 3.1.9 doesn't seem to properly escape the file paths it sends to the commands
- V 3.1.9 Can't find applescript for JPEGMini
- CLI is not installing through brew HOT 1
- RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imageoptim-cli.