-
Notifications
You must be signed in to change notification settings - Fork 695
testrpc doesn't run directly #380
Comments
It appears this command executes correctly. However,
indicates that testrpc executable is not in your path.
and make sure that the location is in $PATH (and accessible by the user who is invoking the command). |
Thanks @jwasinger. I got:
So it seems like it is not accessible by user jamesray. I'm not sure how to check whether the location is in
Further testsI'm not sure if any of the below testing helps, but what I've formatted in bold may be more likely to help. I navigated to the /usr/bin/testrpc file in the files app, clicked on the link and got the error pop-up: "This link cannot be used because its target “/opt/node/lib/node_modules/ethereumjs-testrpc/bin/testrpc” doesn't exist." The files app then froze (after I copied and pasted the message, then opened Brave and then could not reopen the files app). I opened another files window, navigated to /opt/node/lib/node_modules/ethereumjs-testrpc, which showed no bin folder: About I was not able to change the access permission for Group jamesray, or change the group from jamesray to another group, e.g. sudo. There is 9.8 GB of free space on the Linux partition of my SSD. For:
There is no bin visible in /home/jamesray/, so it looks like it kept trying in different local locations that the user jamesray can access, and didn't find a bin, where instead there is a bin in usr/bin, which is outside of my path, and is thus not accessible. So it looks like I have identified the issue, but I'm not sure what the best way is to fix it, e.g. I can't change the permissions via the GUI for jamesray to access files outside of jamesray. Do I need to or can I change permissions as a root user in the terminal, and if so, how? Any ideas? Sorry, I'm new to Linux—I installed it to learn to use lllc recently. |
Perhaps the executable is
in bashprofile. It's difficult to troubleshoot when I can't reproduce the environment you are working in. I would suggest learning how to use https://www.vagrantup.com/ and start doing your development in a VM. That way:
I have a vagrantfile that sets up a nodejs environment within a VM (https://github.com/jwasinger/ethereum-dev-env/tree/master/ethereumjs). So maybe you could use that as a base for setting up testrpc. |
OK, thanks again. I added /usr/bin and /opt/node/bin as you suggested, and testrpc now works! I think I'll go with the VM option anyway. I did try to use VirtualBox before but all of the options were 32 bit so I didn't think that they would work on an x64 system. |
There are versions of virtualbox that are 64 bit: https://www.virtualbox.org/wiki/Linux_Downloads. |
OK. I've already installed VirtualBox (virtualbox-5.1_5.1.26-117224-Ubuntu-xenial_amd64.deb) and I installed Vagrant, saved your vagrantfile to /home/Ethereum-dev-env-ethereum-js, opened that folder in the terminal, and ran vagrant up:
|
It seems like it can't find VirtualBox:
So I'll find where VirtualBox is located. I opened Oracle VM VIrtualBox Manager, went to preferences, and got the default machine folder: /home/jamesray/VirtualBox VMs, which is in my path, however there is no home/jamesray folder in the files app. |
OK, I installed VirtualBox via the Ubuntu Software app, because it wasn't showing in the installed list on that program. When I saved the file in gedit to the /home folder for convenience, it saved it as an HTML file, so I changed it back to a plain text file in the drop down menu, however it would still show in the properties as a HTML. If I changed the filename to Vagrantfile.txt to force it to be a plain text document, vagrant file still didn't work. I did get vagrant up to work at one point where I think your vagrantfile was in the ~/Ethereum-dev-env-ethereum-js folder, and there was no vagrantfile, but I can't get it working again yet. I tried
There is no base folder. What I'll do: either re-add a base folder, or reinstall Ubuntu 16.04 LTS. |
Hmm. yeah reinstalling your OS might be a good option. it's hard to say. In general, I would avoid installing software using the Ubuntu software app. Things are often outdated. |
Yeah I'm just waiting for the ISO file to write to the disc, and will be installing 17.04 instead. Yeah I noticed the version for vagrant wasn't 2.0 in the software app; I will avoid using it. |
I'm having the same issue with Ubuntu 16.04 where the installer keeps crashing via USB, but this time I wiped 16.04 and Windows, so I can't use the computer to try other things, e.g. write to a CD/DVD, or do a memtest86+. I'll use my Windows disc to boot. |
OK I'm using Ubuntu 17.04 now, after I booted Windows, burnt the ISO to a DVD, and booted via try Ubuntu without installing (the install option didn't work, same with OEM install, since the keyboard and mouse didn't work in the installer). |
I installed Virtual Box via the instructions here, created a vagrant file, copied and pasted your instructions and ran vagrant up but it didn't work. So I changed:
However, your file has
The full changed file is (excl. comments):
However,
|
Were you able to get an example box up and running? |
There is a syntax error in the Vagrantfile. Try pulling the latest version and running |
Sorry I'm not sure what needs to be done to get an example box up and running, but I'll try |
Same error as before reinstalling where it can't locate the base folder:
|
I'm going to close the original issue as I did get |
|
Time to Ask Ubuntu. |
Ah I know why it didn't work. I didn't specify anything for This seems to work:
|
I terminated the download, then used your file with the latest commit (changing to zesty64), and it also seems to work now, resuming the download from where I left off with |
Alas it seems I spoke to soon.
I will try this. |
oh yeah. im running on a beast of a machine so you may want to tune down the number of cpus and memory used |
OK, I was just checking the BIOS settings, but will try that first. |
I'll try With 2048 it will be slower, so I've enabled Intel Virtualisation Technology in the BIOS and changed back to I got red errors in the output (non-errors in green are omitted):
I also got a long list of red errors, so the full output doesn't show in the terminal because I can't scroll up any more. They seem pretty meaningless, all of the lines are of four varieties:
|
Here are the log files: |
I ran it again with
|
Taking this to Ask Ubuntu again: https://askubuntu.com/questions/954116/how-to-fix-vagrant-provision-errors-inline-script-ttyname-failed-inapp |
I had the same problem ; maybe for some unix-based os it's not adding correctly the path to $PATH. Maybe you should correct it ! :-) |
No it's all good, the error I'm currently getting is an SSH no connection error. But that's happening because I haven't enabled SSH on my router gateway. I may do that after I finish reading the yellow paper. |
Expected Behavior
Should display a banner with the TestRPC version, 9 account addresses, 9 private keys, HD wallet info, and "listening on localhost:8545".
Current Behavior
When entering
testrpc
at the home/user directory, the output istestrpc: command not found
.Possible Solution
Entering
/opt/node/lib/node_modules/ethereumjs-testrpc/build/cli.node.js
results in the expected behaviour.Steps to Reproduce (for bugs)
Here is what I’ve done:
jamesray@james-ASUS-Streacom-FC8:~$ lllc — version LLLC, the Lovely Little Language Compiler Version: 0.4.16-develop.2017.8.19+commit.83b90f3e.Linux.g++
The following is omitted before $ in future code:
jamesray@james-ASUS-Streacom-FC8:~
Continuing:
Following the last command I get a long list of filepaths. Then:
Debugging
No output.
omitted list of 9 addresses
omitted list of 9 keys
omitted
Context
Going through the compiling LLL tutorial by Daniel Ellison, it instructs to install and run testrpc.
Your Environment
Version: 0.4.16-develop.2017.8.19+commit.83b90f3e.Linux.g++`
The text was updated successfully, but these errors were encountered: