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

sudo: cargo: command not found #3

Closed
rubo77 opened this issue Jun 11, 2018 · 9 comments
Closed

sudo: cargo: command not found #3

rubo77 opened this issue Jun 11, 2018 · 9 comments
Labels
kind: bug Something isn't working

Comments

@rubo77
Copy link
Contributor

rubo77 commented Jun 11, 2018

When I come to the step

sudo -u ff-node-monitor cargo build --release

I get the error

sudo: cargo: command not found

I tried on Debian stretch and on jessie plain install.

@RalfJung
Copy link
Member

Hm indeed, I can reproduce. Seems like the PATH isn't picked up. Does this work?

sudo -u ff-node-monitor /var/lib/ff-node-monitor/.cargo/bin/cargo build --release

@RalfJung RalfJung added the kind: bug Something isn't working label Jun 11, 2018
@rubo77
Copy link
Contributor Author

rubo77 commented Jun 11, 2018

yes, that works. It starts building, but then it fails:


error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `rayon-core`.
warning: build failed, waiting for other jobs to finish...
error: build failed

@rubo77
Copy link
Contributor Author

rubo77 commented Jun 11, 2018

I had to apt install gcc to make it compile

@rubo77
Copy link
Contributor Author

rubo77 commented Jun 11, 2018

In the beginning I had to install curl, so maybe add this too to the readme

@rubo77
Copy link
Contributor Author

rubo77 commented Jun 11, 2018

Außerdem musste ich das Paket pkg-config installieren, damit er den Pfad zu OpenSSL finden kann beim compilieren

@rubo77
Copy link
Contributor Author

rubo77 commented Jun 11, 2018

Also auf Debian stretch and on jessie:

apt install curl gcc pkg-config libssl-dev libpq-dev postgresql

But in the end of compilation, I get this error:

error[E0432]: unresolved import `syntax::parse::common`
 --> /var/lib/ff-node-monitor/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_codegen-0.3.12/src/utils/parser_ext.rs:5:20
  |
5 | use syntax::parse::common::SeqSep;
  |                    ^^^^^^ Could not find `common` in `parse`

error[E0624]: method `parse_seq_to_end` is private
  --> /var/lib/ff-node-monitor/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_codegen-0.3.12/src/utils/parser_ext.rs:13:14
   |
13 |         self.parse_seq_to_end(&Eof,
   |              ^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

I tried this in both: jessie and stretch... same result.

@rubo77
Copy link
Contributor Author

rubo77 commented Jun 11, 2018

Ev. muss das so heissen?

use syntax::parse::SeqSep;

also ohne common::

@RalfJung
Copy link
Member

Thanks, I updated the build instructions to fix the path to cargo and add the missing packages.

But in the end of compilation, I get this error:

Rocket is unfortunately broken with current Rust nightly, which is tracked at rwf2/Rocket#660. You can either wait until rust-lang/rust#51502 lands (which fixes the problem), or use an older nightly:

$ sudo -u ff-node-monitor /var/lib/ff-node-monitor/.cargo/bin/rustup default nightly-2018-06-09

I am going to close this issue because the build issue is unrelated.

@rubo77
Copy link
Contributor Author

rubo77 commented Jun 12, 2018

OK i restart with

sudo -u ff-node-monitor /var/lib/ff-node-monitor/.cargo/bin/rustup default nightly-2018-06-09
cd /var/lib/ff-node-monitor/src/
sudo -u ff-node-monitor /var/lib/ff-node-monitor/.cargo/bin/cargo build --release

But this gives a new error (see #5 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants