How to install protobuf?

:pray:please I think I need Umar not at home because I am struggling since I suck at nix and terminal. I’m trying to install protobuf (also called protoc in terminal) to compile some protobuf into python

ahem @UMARismyname

Note: I’ve tried many, many things from installing and compiling the protobuf (which doesn’t work since it’s read only + no sudo) to trying to just use nix…

From looking here:

sed -i 's/];/  pkgs.protobuf&/' replit.nix

Or just add this to replit.nix:

pkgs.protobuf
2 Likes

yes that doesn’t work… protobuf doesn’t exactly compile ;-;

What does nix spit out when you try that?

1 Like

latest ver of protobuf


Error: prybar-python310 not found in $PATH
repl process died unexpectedly: exit status 1
nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
instantiated 'llvm-src-14.0.6' -> '/nix/store/hzbkf2172vzda7nzzvh32ix2bkyvl9qy-llvm-src-14.0.6.drv'
instantiated 'llvm-14.0.6' -> '/nix/store/w7q392v0hqv8pz0bcz6pvzbdlyynw2bs-llvm-14.0.6.drv'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/remove-references-to/default.nix'
copied source '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/remove-references-to/remove-references-to.sh' -> '/nix/store/bm9by9a8wn0ik9lsix9bvfqk7xrc9zdv-remove-references-to.sh'
instantiated 'remove-references-to' -> '/nix/store/848845bkjc8nwgpj11dl3jzj7dj78a6r-remove-references-to.drv'
instantiated 'rustc-1.64.0-src.tar.gz' -> '/nix/store/ws0v0x6f7yqigkfxp8vgzhmk2h5ybf10-rustc-1.64.0-src.tar.gz.drv'
instantiated 'rustc-1.64.0' -> '/nix/store/lppv3zkqbj2y1mf673hmkmj5632rj2dw-rustc-1.64.0.drv'
instantiated 'cargo-1.64.0' -> '/nix/store/v36sa8s85x8ch9lscj02w6r6grchqs15-cargo-1.64.0.drv'
instantiated 'stderred-0.1.0-vendor.tar.gz' -> '/nix/store/y5abrybwr705v5myr8lmmpvxq1qmxmgz-stderred-0.1.0-vendor.tar.gz.drv'
instantiated 'cargo-build-hook.sh' -> '/nix/store/apapd2wzi70yidvknzijy4na6wj33slj-cargo-build-hook.sh.drv'
instantiated 'cargo-check-hook.sh' -> '/nix/store/rdly9ahrydc1q3j3cwl74lxzq96f4w5s-cargo-check-hook.sh.drv'
instantiated 'cargo-install-hook.sh' -> '/nix/store/130wr2z53wqv45xfmd9djmws8z98asl3-cargo-install-hook.sh.drv'
instantiated 'cargo-setup-hook.sh' -> '/nix/store/50l87zlfrg0x6k255bgaip21mjiiizai-cargo-setup-hook.sh.drv'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/tools/misc/stderred/default.nix'
instantiated 'source' -> '/nix/store/s7pdlwr5hzfrcsix3gkhn8hrqdm4jqbw-source.drv'
instantiated 'stderred-unstable-2021-04-28' -> '/nix/store/5iakizzsfqf0dva6nqknmi4xmf9941p8-stderred-unstable-2021-04-28.drv'
instantiated 'stderred-0.1.0' -> '/nix/store/6n6r5c2la6msw4s5hh18q5q1fmj59c12-stderred-0.1.0.drv'
error: attribute 'protobuf3_16' missing, at /home/runner/DisfiguredLivelyCryptos/replit.nix:6:5
(use '--show-trace' to show detailed location information)

Error: prybar-python310 not found in $PATH
repl process died unexpectedly: exit status 1
nix error: building nix env: exit status 1

alternatively trying to install it in shell

protoc: command not installed. Multiple versions of this command were found in Nix.
Select one to run (or press Ctrl-C to cancel):
Adding protobuf3_16 to replit.nix
success
error: attribute 'protobuf3_16' in selection path 'protobuf3_16.out' not found
Failed to install nixpkgs.protobuf3_16.out.
protoc: command not found
Detected change in environment, reloading shell...
nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
instantiated 'llvm-src-14.0.6' -> '/nix/store/hzbkf2172vzda7nzzvh32ix2bkyvl9qy-llvm-src-14.0.6.drv'
instantiated 'llvm-14.0.6' -> '/nix/store/w7q392v0hqv8pz0bcz6pvzbdlyynw2bs-llvm-14.0.6.drv'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/remove-references-to/default.nix'
copied source '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/remove-references-to/remove-references-to.sh' -> '/nix/store/bm9by9a8wn0ik9lsix9bvfqk7xrc9zdv-remove-references-to.sh'
instantiated 'remove-references-to' -> '/nix/store/848845bkjc8nwgpj11dl3jzj7dj78a6r-remove-references-to.drv'
instantiated 'rustc-1.64.0-src.tar.gz' -> '/nix/store/ws0v0x6f7yqigkfxp8vgzhmk2h5ybf10-rustc-1.64.0-src.tar.gz.drv'
instantiated 'rustc-1.64.0' -> '/nix/store/lppv3zkqbj2y1mf673hmkmj5632rj2dw-rustc-1.64.0.drv'
instantiated 'cargo-1.64.0' -> '/nix/store/v36sa8s85x8ch9lscj02w6r6grchqs15-cargo-1.64.0.drv'
instantiated 'stderred-0.1.0-vendor.tar.gz' -> '/nix/store/y5abrybwr705v5myr8lmmpvxq1qmxmgz-stderred-0.1.0-vendor.tar.gz.drv'
instantiated 'cargo-build-hook.sh' -> '/nix/store/apapd2wzi70yidvknzijy4na6wj33slj-cargo-build-hook.sh.drv'
instantiated 'cargo-check-hook.sh' -> '/nix/store/rdly9ahrydc1q3j3cwl74lxzq96f4w5s-cargo-check-hook.sh.drv'
instantiated 'cargo-install-hook.sh' -> '/nix/store/130wr2z53wqv45xfmd9djmws8z98asl3-cargo-install-hook.sh.drv'
instantiated 'cargo-setup-hook.sh' -> '/nix/store/50l87zlfrg0x6k255bgaip21mjiiizai-cargo-setup-hook.sh.drv'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/tools/misc/stderred/default.nix'
instantiated 'source' -> '/nix/store/s7pdlwr5hzfrcsix3gkhn8hrqdm4jqbw-source.drv'
instantiated 'stderred-unstable-2021-04-28' -> '/nix/store/5iakizzsfqf0dva6nqknmi4xmf9941p8-stderred-unstable-2021-04-28.drv'
instantiated 'stderred-0.1.0' -> '/nix/store/6n6r5c2la6msw4s5hh18q5q1fmj59c12-stderred-0.1.0.drv'
error: attribute 'protobuf3_16' missing, at /home/runner/DisfiguredLivelyCryptos/replit.nix:3:5
(use '--show-trace' to show detailed location information)

Huh. What if you just use protobuf and not protobuf3_16?

2 Likes

Detected change in environment, reloading shell...
nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
instantiated 'llvm-src-14.0.6' -> '/nix/store/hzbkf2172vzda7nzzvh32ix2bkyvl9qy-llvm-src-14.0.6.drv'
instantiated 'llvm-14.0.6' -> '/nix/store/w7q392v0hqv8pz0bcz6pvzbdlyynw2bs-llvm-14.0.6.drv'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/remove-references-to/default.nix'
copied source '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/remove-references-to/remove-references-to.sh' -> '/nix/store/bm9by9a8wn0ik9lsix9bvfqk7xrc9zdv-remove-references-to.sh'
instantiated 'remove-references-to' -> '/nix/store/848845bkjc8nwgpj11dl3jzj7dj78a6r-remove-references-to.drv'
instantiated 'rustc-1.64.0-src.tar.gz' -> '/nix/store/ws0v0x6f7yqigkfxp8vgzhmk2h5ybf10-rustc-1.64.0-src.tar.gz.drv'
instantiated 'rustc-1.64.0' -> '/nix/store/lppv3zkqbj2y1mf673hmkmj5632rj2dw-rustc-1.64.0.drv'
instantiated 'cargo-1.64.0' -> '/nix/store/v36sa8s85x8ch9lscj02w6r6grchqs15-cargo-1.64.0.drv'
instantiated 'stderred-0.1.0-vendor.tar.gz' -> '/nix/store/y5abrybwr705v5myr8lmmpvxq1qmxmgz-stderred-0.1.0-vendor.tar.gz.drv'
instantiated 'cargo-build-hook.sh' -> '/nix/store/apapd2wzi70yidvknzijy4na6wj33slj-cargo-build-hook.sh.drv'
instantiated 'cargo-check-hook.sh' -> '/nix/store/rdly9ahrydc1q3j3cwl74lxzq96f4w5s-cargo-check-hook.sh.drv'
instantiated 'cargo-install-hook.sh' -> '/nix/store/130wr2z53wqv45xfmd9djmws8z98asl3-cargo-install-hook.sh.drv'
instantiated 'cargo-setup-hook.sh' -> '/nix/store/50l87zlfrg0x6k255bgaip21mjiiizai-cargo-setup-hook.sh.drv'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/tools/misc/stderred/default.nix'
instantiated 'source' -> '/nix/store/s7pdlwr5hzfrcsix3gkhn8hrqdm4jqbw-source.drv'
instantiated 'stderred-unstable-2021-04-28' -> '/nix/store/5iakizzsfqf0dva6nqknmi4xmf9941p8-stderred-unstable-2021-04-28.drv'
instantiated 'stderred-0.1.0' -> '/nix/store/6n6r5c2la6msw4s5hh18q5q1fmj59c12-stderred-0.1.0.drv'
error: attribute 'proto' missing, at /home/runner/RipeMeagerTrial/replit.nix:6:5
(use '--show-trace' to show detailed location information)

Error: prybar-python310 not found in $PATH
repl process died unexpectedly: exit status 1
nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
instantiated 'llvm-src-14.0.6' -> '/nix/store/hzbkf2172vzda7nzzvh32ix2bkyvl9qy-llvm-src-14.0.6.drv'
instantiated 'llvm-14.0.6' -> '/nix/store/w7q392v0hqv8pz0bcz6pvzbdlyynw2bs-llvm-14.0.6.drv'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/remove-references-to/default.nix'
copied source '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/remove-references-to/remove-references-to.sh' -> '/nix/store/bm9by9a8wn0ik9lsix9bvfqk7xrc9zdv-remove-references-to.sh'
instantiated 'remove-references-to' -> '/nix/store/848845bkjc8nwgpj11dl3jzj7dj78a6r-remove-references-to.drv'
instantiated 'rustc-1.64.0-src.tar.gz' -> '/nix/store/ws0v0x6f7yqigkfxp8vgzhmk2h5ybf10-rustc-1.64.0-src.tar.gz.drv'
instantiated 'rustc-1.64.0' -> '/nix/store/lppv3zkqbj2y1mf673hmkmj5632rj2dw-rustc-1.64.0.drv'
instantiated 'cargo-1.64.0' -> '/nix/store/v36sa8s85x8ch9lscj02w6r6grchqs15-cargo-1.64.0.drv'
instantiated 'stderred-0.1.0-vendor.tar.gz' -> '/nix/store/y5abrybwr705v5myr8lmmpvxq1qmxmgz-stderred-0.1.0-vendor.tar.gz.drv'
instantiated 'cargo-build-hook.sh' -> '/nix/store/apapd2wzi70yidvknzijy4na6wj33slj-cargo-build-hook.sh.drv'
instantiated 'cargo-check-hook.sh' -> '/nix/store/rdly9ahrydc1q3j3cwl74lxzq96f4w5s-cargo-check-hook.sh.drv'
instantiated 'cargo-install-hook.sh' -> '/nix/store/130wr2z53wqv45xfmd9djmws8z98asl3-cargo-install-hook.sh.drv'
instantiated 'cargo-setup-hook.sh' -> '/nix/store/50l87zlfrg0x6k255bgaip21mjiiizai-cargo-setup-hook.sh.drv'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/tools/misc/stderred/default.nix'
instantiated 'source' -> '/nix/store/s7pdlwr5hzfrcsix3gkhn8hrqdm4jqbw-source.drv'
instantiated 'stderred-unstable-2021-04-28' -> '/nix/store/5iakizzsfqf0dva6nqknmi4xmf9941p8-stderred-unstable-2021-04-28.drv'
instantiated 'stderred-0.1.0' -> '/nix/store/6n6r5c2la6msw4s5hh18q5q1fmj59c12-stderred-0.1.0.drv'
error: attribute 'proto' missing, at /home/runner/RipeMeagerTrial/replit.nix:6:5
(use '--show-trace' to show detailed location information)

proto? Did you mistype it?

1 Like

protobuf not proto. Try protobuf.

1 Like

if I can’t install the latest version, then the prev one’s will be more buggy ;-;

I pulled an old repl of mine, and adding protobuf had no issues.

All else fails, I suppose you could fork that repl :person_shrugging:

1 Like

ok thanks I’ll see if it works

1 Like

dang you are a genius ;-;

1 Like

I’m really not, I just took what little I knew about NIX and ran with it tbh.

2 Likes

I do not

know anything about nix

1 Like

protobuf is the latest version available on the channel. You could change the nix channel in the .replit file to unstable. Strangely either the stable channels don’t have the latest patches, or protobuf doesn’t use semantic versioning.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.