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

[Magic CLI]: Unable to install packages with magic #3590

Closed
suahelen opened this issue Oct 1, 2024 · 8 comments
Closed

[Magic CLI]: Unable to install packages with magic #3590

suahelen opened this issue Oct 1, 2024 · 8 comments
Labels
magic-cli Anything related to the Magic CLI mojo-repo Tag all issues with this label

Comments

@suahelen
Copy link

suahelen commented Oct 1, 2024

Issue description

I am running in to issues with magic after a fresh install on wsl2.
All command that would install the max package seem to fail. e.g.

magic install
magic shell
magic run mojo

all these commands result in something along the lines of:

⠤ validate cache [00:00:03] [━━━━━━━━━━━━━━━━━───] max-python (+1)
⠤ download & extract [00:00:03] [━━──────────────────] 21.10 MiB @ 2.34 MiB/s max-core
⠴ installing packages [00:00:03] [━━━━━━━━╾───────────] 5/12 numpy (+3) × failed to link ncurses-6.5-he02047a_1.conda
├─▶ failed to link 'share/terminfo/2/2621a'
├─▶ unexpected io operation while removing clobbered file
╰─▶ No such file or directory (os error 2)

if i remove the max package the magic commands run again, but obviously mojo is not available anymore.

Thanks for any ideas.

Steps to reproduce

install magic with:
curl -ssL https://magic.modular.com/3c7b6166-badc-49be-bb0f-0bd100dcb8b2 | bash
source /home/fam/.bashrc

init project:
magic init my-mojo-project --format mojoproject

run any of the commands mentioned before

Version Info

- magic --version => magic 0.3.0
- os = wsl2 (ubuntu 2204) on windows 
- mojoproject.toml:

[project]
channels = ["conda-forge", "https://conda.modular.com/max"]
description = "Add a short description here"
name = "my-mojo-project
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]
max = ">=24.5.0,<25"
@suahelen suahelen added magic-cli Anything related to the Magic CLI mojo-repo Tag all issues with this label labels Oct 1, 2024
@zbowling
Copy link
Contributor

zbowling commented Oct 1, 2024

This can happen if you have a case sensitive filesystem mounted on a case-insenstative system. The ncruses packages has two files in it's package with the same name but different cases. See prefix-dev/pixi#1362

@zbowling
Copy link
Contributor

zbowling commented Oct 1, 2024

Also see: prefix-dev/pixi#234

@suahelen
Copy link
Author

suahelen commented Oct 2, 2024

thanks for the heads-up.
Just for completenes sake and to wrap up, here how I worked around it.
That way you can keep project files on the windows file system if necessary.

select a package dir on the wsl file system:
export MAGIC_HOME=/home/yourusername/.magic_packages

create a project dir within that that package dir:
mkdir -p $MAGIC_HOME/projects/<your_project>

create a symlink from your project dir to the package dir:
ln -s $MAGIC_HOME/projects/<your_project>/mnt/c/projects/<your_project>/.magic

@suahelen suahelen closed this as completed Oct 2, 2024
@liuzhishan
Copy link

Hi, how to fix this problem? I encountered the same problem in ubuntu using docker on mac. And I follow the above link, prefix-dev/pixi#1362 and didn't find a solution.

@suahelen
Copy link
Author

In my case the problem occurred cause I was using a project folder on a windows pc from WSL.

To solve it, I directly cloned the repo of my code to the wsl-filesystem.

@liuzhishan
Copy link

Seems different from my problem, I was installing inside the docker container. And the error is about another package ncurses, not my code.

@ruben-arts
Copy link

@liuzhishan, it could also happen if the cache directory is on a different filesystem, with magic info you should be able to find the cache location that is used.

@liuzhishan
Copy link

liuzhishan commented Dec 4, 2024

@ruben-arts thanks, I will have a try with magic info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
magic-cli Anything related to the Magic CLI mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

4 participants