ceramic-engine / ceramic

Cross-platform 2D framework written in Haxe that can export natively to desktop (windows, mac, linux), mobile (ios, android), web (js + webgl) and to unity projects
MIT License
264 stars 22 forks source link

linux install #77

Closed daimeng closed 2 years ago

daimeng commented 2 years ago

Hi guys! I wasn't able to install ceramic globally on linux. I think it's permissions related.

After pointing install to my user directory and doing local install it worked.

Here are the errors I got, if they're useful:

This is the first error I receive whether I answer y or n.

Make `ceramic` command available globally? (y/n)
n
Called from ? line 1
Called from Main.hx line 114
Called from Main.hx line 214
Called from Main.hx line 294
Called from /usr/local/lib/haxe/std/neko/_std/Sys.hx line 89
Uncaught exception - std@set_cwd

I then tried to point the install to folder in my user directory:

Make `ceramic` command available globally? (y/n)
y
Error: EACCES: permission denied, open '/usr/local/bin/ceramic'
    at Object.openSync (fs.js:443:3)
    at Object.writeFileSync (fs.js:1194:35)
    at tools_tasks_Link.run (/home/daimeng/ceramic/ceramic/tools/file:/home/runner/work/ceramic/ceramic/tools/src/tools/tasks/Link.hx:26:17)
    at Function.tools_Tools.run (/home/daimeng/ceramic/ceramic/tools/file:/home/runner/work/ceramic/ceramic/tools/src/tools/Tools.hx:255:17)
    at /home/daimeng/ceramic/ceramic/tools/file:/home/runner/work/ceramic/ceramic/tools/src/tools/Tools.hx:30:13

Haxe v4,2,4

jeremyfa commented 2 years ago

Hi, you might want to try to run the installer again with sudo (sudo haxelib run ceramic setup) and see if that solves it.

daimeng commented 2 years ago

hmm, still happens. I thought sudo would work also, I just wanted to avoid it since it sets up a separate haxelib repo.

> sudo haxelib run ceramic setup
ceramic is not installed. It will be installed to: ceramic
Install ceramic v0.9.4? (y/n)
y
Downloading ceramic-linux.zip...
Download complete : 654 bytes in 0.3s (2.1KB/s)
Download complete : 189068162 bytes in 22.1s (8330.4KB/s)
Unzipping... (this may take a while)
Done
Make `ceramic` command available globally? (y/n)
y
Called from ? line 1
Called from Main.hx line 114
Called from Main.hx line 212
Called from Main.hx line 294
Called from /usr/local/lib/haxe/std/neko/_std/Sys.hx line 89
Uncaught exception - std@set_cwd

Am I missing a prerequisite or have some path configured wrong? I can't find a /usr/local/lib/haxe folder...

jeremyfa commented 2 years ago

I'll have to check the script and test it on linux again. Wondering why the setCwd() fails.

jeremyfa commented 2 years ago

I updated the haxelib installer.

You may try to update it (haxelib install ceramic 0.3.1) then try to run the command again.

Hopefully my fix will solve your issue (sudo might still be required for the global install though)