0

Please be gentle, I'm very inexperienced with this stuff!
I have a lenovo x200 thinkpad running Linux Mint 20.3; I've had no issues orientating myself with linux mint so far, although I am still very new to linux in general.

I have been attempting to install and run Dfinity foundation's SDK kit on this laptop. I've used this SDK before on this laptop before, back when it was running win10 with no issue. It seems I can install the shared library using the command

sh -ci "$(curl -fsSL https://smartcontracts.org/install.sh)"

this generates the dfx library in /home/doolb/bin. Running the command

dfx --version

Initially was not recognised as a command, until I ran

export PATH=$PATH:/home/doolb/bin

After exporting this path, "dfx --version" correctly returns "dfx 0.11.1", so I'm sure I've installed dfx correctly at this point.
The problem occurs when I attempt to use the "new" command to create a new project. For example, running

dfx new DApp

returns the following:

Fetching manifest https://sdk.dfinity.org/manifest.json
⠚ Checking for latest dfx version...
Segmentation fault (core dumped)

The little ⠚ rotates for a second before returning the Segmentation Fault.

I can't for the life of me figure out why this is happening. I've run memtest, reinstalled mint, reinstalled dfx, and the problem persists. Can somebody help me troubleshoot what might be causing this segmentation fault? I have a suspicion this could be caused by write permissions, but I'm not sure how to diagnose this. For reference, I've been loosely following this tutorial: https://internetcomputer.org/docs/current/developer-docs/quickstart/hello10mins/

Any help would be much appreciated!
Kind Regards,
Doolb

wjandrea
  • 28,235
  • 9
  • 60
  • 81
Doolb
  • 1
  • Maybe it's a Node.js bug, have you followed [the associated section](https://internetcomputer.org/docs/current/developer-docs/quickstart/hello10mins/#nodejs) of the guide ? May you try `dfx new --no-frontend DApp` to see if it's frontend related ? As you mentioned possible permissions issues, may you try running the command as root ? – Benjamin Loison Aug 20 '22 at 21:12
  • 1
    Welcome to Stack Overflow! Please take the [tour]. For tips, check out [How to ask a good question](/help/how-to-ask). – wjandrea Aug 20 '22 at 21:25
  • Cheers for the prompt response, Benjamin. Can confirm I installed node.js via the software manager, and running the command with --no-frontend makes no difference. I did try running the commands as root, but as I mentioned, I'm a little new to this - I ran sudo su and got "root@Doolb:/home/doolb#" on my CLI, but dfx was no longer a recognised command. I came out of root, uninstalled dfx, went back into root, reinstalled dfx, and found that there was no difference (Though it feels like this was bad practice...) – Doolb Aug 20 '22 at 22:10
  • Are you experiencing this issue in a special context as you mentioned that maybe you don't have some permissions, as we got [a kind of similar case](https://stackoverflow.com/a/73152871/7123660) recently. I am not keen on debugging a Rust binary, anyway if you're keen on Rust you can try debugging as [dfx is open-source](https://github.com/dfinity/sdk). Otherwise also posting on [DFINITY forum](https://forum.dfinity.org/) may bring attention to a wider audience notavly the DFINITY Foundation. – Benjamin Loison Aug 21 '22 at 04:02
  • May you give a try to Rust debugging by sharing the GDB backtrace by executing: `gdb -ex r -ex 'set pagination off' -ex 'bt f' -ex 'set confirm off' -ex q --args dfx new --no-frontend DApp` – Benjamin Loison Aug 22 '22 at 13:16

0 Answers0