-
Notifications
You must be signed in to change notification settings - Fork 58
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
issue with installing magic rock #91
Comments
Hey, I'm not sure how things work on macOS, does this help you? |
this I tried. still not working |
Neovim is supposed to come with LuaJIT, and it should works in its context, your external Lua version doesn't matter. |
I had the same problem, and this did the trick: |
I have tried this but it didn't work. Which chip you are using? M or intel? @Gabz-Araujo |
I followed @Gabz-Araujo and it worked. But, |
@spring-haru you will likely have to follow some instructions in the pinned issue if you're on macos |
Hi there. It happens on Ubuntu 22.04. |
no, it's using the magick lua rock, you can check if your setup worked by running |
This no longer seems to be an option.
Luckily compiling it from source is quite simple. |
Getting a similar error on install: Error detected while processing VIMINIT:
image.nvim: magick rock not found, please install it and restart your editor
[LSP] Format request failed, no matching language servers. Here's my package path extension: -- Package Path Upgrade
----------
-- Rocks installed through luarocks.nvim
package.path = package.path .. ";" .. plugin_path .. "/luarocks.nvim/.rocks/share/lua/5.1/?.lua"
package.path = package.path .. ";" .. plugin_path .. "/luarocks.nvim/.rocks/share/lua/5.1/?/init.lua"
-- Rocks installed through local luarocks
package.path = package.path .. ";" .. fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua"
package.path = package.path .. ";" .. fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua"
-- Literally Pointing to my magick install
package.path = package.path .. ";" .. fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/magick/init.lua"
---------- Plugin just doesn't seem to be able to find magick/init.lua??? |
Updated it so it shows the loading error for the rock, it might point you in the right direction. |
I tried this on my M2 chip Macbook and it worked, see #9 (comment) change the magick/wand/lib.lua
|
I also have a similar issue. However, I only get Here's my image.lua file:
and here's my rocks.lua file:
If I run |
If you want to use luarocks.nvim you have to tell it to install the magick rock. Image.nvim doesn't do it automatically like some other plugins do. Take a look at the image.nvim readme for an example |
Sorry, you're right. I somehow forgot to add options.
The issue is still happening. I did restart the terminal. |
Probably need to run |
Yeah, I also thought so. Didn't help 🤔 . |
Did you follow the other steps for Mac os from the readme? The installing magic part in particular? There's a note about brew installing something in a place that nvim doesn't check and how to fix it |
Yep. I did that:
and if I check with |
What's your exact error? You should get something more than just |
@FunnyGhost solved it like #91 (comment) |
@mesa123123 I listened to @Gabz-Araujo's suggestion: luarocks --lua-version=5.1 install magick The solution I found was the following: lib = try_to_load(
"/opt/homebrew/Cellar/imagemagick/7.1.1-30/lib/libMagickWand-7.Q16HDRI.dylib",
"/opt/homebrew/Cellar/imagemagick@6/6.9.13-7/lib/libMagickWand-6.Q16.dylib",
"/opt/homebrew/bin/imagemagick/7.1.1-25/lib/libMagickWand-7.Q16HDRI.dylib"
) In my case, in the first line: "/opt/homebrew/Cellar/imagemagick/7.1.1-30/lib/libMagickWand-7.Q16HDRI.dylib", read 7.1.1-29. Checking the path I realized it should be 7.1.1-30 |
after a while try reinstalling lua/luajit and install pkg-config using brew, mine finally works in MacAir M1 |
Unfortunately this is still an issue. You cannot install Lua 5.1 with homebrew anymore
|
Hey @t18n, for lua 5.1 you can install luajit.
|
This worked for me, thank you! |
I've re-packaged the luarocks package for neovim, and modified it slightly so that it will locate the local installation of magick as well. Instead of using luarocks, you can just install this plugin. |
#91 (comment) worked for me. Here is the command I used to get the library path: fd 'libmagickwand.*\.(so|dylib|dll)$' / --hidden |
I beat my head against the wall for bit with this, but I had to install pkgconfig to get this to work: brew install pkgconfig Then it magically worked |
+1 to @dreilly1982 's suggestion. I'm currently using MacOS and was originally able to resolve the issue with this workaround mentioned above. Happy to say this workaround is no longer necessary after running |
I ran into a similar issue when trying to run the minimal config on a fresh installation of Arch Linux. I noticed that for the tiniest amount of time a message from presumably the shell (?) flashed on the screen which mentioned that I also noticed that the mode of failure seems to be the same as when |
@burbschat do you have an otherwise working ImageMagick installation? (convert and identify commands available and working) |
@3rd Yes indeed I do have a working ImageMagick installation. Switching to I've been testing this using the minimal config to which I added one line to set the processor to Looking at the
|
Hey, it was an extra check that ran all the time, fixed now. |
It seems that {
"3rd/image.nvim",
opts = { ... },
build = false, -- This option disables build.
}, I locally tested setting like above, and confirmed that it skips luarocks build steps. I'm not sure about #240. |
Thank you @sankantsu! Rewriting the README now with the help of Claude, who has a beautiful personality today 😂 |
Hi, sorry, is this resolved? What's the answer? On MacOS how do I get the minimal example to work? I tried one of the suggestions: which doesn't work (even after I brew install luarocks) |
so the answer is |
@varung Ive also done all the above and am not getting it to work on M1 mac. Would love someone to post a cohesive way to get this to work. |
Hey, if you have a regular working imagemagick installation you can use the |
@3rd I couldnt get magick_cli to work either. I tried everything in this thread as well as other threads and simply couldnt giet it figured out on M1 MacOS. Maybe its just me though. Thats why I'd like to see a "full solution" to try. |
It's just my opinion, but given that it's so hard to install dev version of magick and involves more complicated steps with luarocks, I believe the CLI interface should be the default mode and leave FFI bindings for the the advanced users. |
@aogposton for cli mode the plugin uses only the |
➜ lua -v ➜ luarocks --lua-version=5.4 install magick Error: Your user does not have write permissions in /usr/lib/luarocks/rocks-5.4 ➜ luarocks install magick --local Error: No results matching query were found for Lua 5.4. ➜ luarocks install magick --local --check-lua-versions Error: No results matching query were found for Lua 5.4. I found the problem, I need to downgrade the lua version |
Mac os , lua 5.4
image.nvim: magick rock not found, please install it and restart your editor
luarocks install magick: To check if it is available for other Lua versions, use --check-lua-versions.
it seems that magic rock only support lua 5.1
How to solve it?
Can I run neovim without magic rock?
thank you. This plugin is amazing ,its a game changer!
The text was updated successfully, but these errors were encountered: