Moc / motoko installation troubles


Is the dfx installer supposed to install moc as well? It’s not doing that on my linux laptop :stuck_out_tongue:

In any case, how do I install moc and the base libraries on a linux laptop (Fedora 36)?

Yes, the install script should download a lot of utilities. As of dfx 0.11.2 the full list should look like this:

❯ ls $(dfx cache show) 
base				        libgmp.10.dylib
canister_sandbox		    libsecp256k1.0.dylib
dfx				            libz.1.2.12.dylib
ic-btc-adapter		     	mo-doc
ic-canister-http-adapter	mo-ide
ic-ref				        moc
ic-starter			        replica
icx-proxy			        sandbox_launcher

BUT the install script does not add this directory to $PATH, so moc won’t be accessible through she command line. If you want it in your path, you’ll have to do that on your own, but I’d recommend you add $(dfx cache show) so you get the latest one when you upgrade dfx.

1 Like

hmm … that’s weird:

$ dfx cache show
$ ls /home/user/.cache/dfinity/versions/0.11.2
ls: cannot access '/home/user/.cache/dfinity/versions/0.11.2': No such file or directory

it merely installs dfx under (my pre-existing) $HOME/bin directory.

Ah, right, I forgot: It’s not the install script that fills the cache but dfx once it runs certain operations. dfx new does the trick.


Aaaaaaaaaaah, okay, that’s a bit “unusual” :stuck_out_tongue:

1 Like

You could also run dfx cache install after upgrading to populate that directory ; )