PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, May 14, 2022

[FIXED] How do we install rustc, cargo for all the users in the same linux machine?

 May 14, 2022     installation, linux, rust, rust-cargo, ubuntu     No comments   

Issue

I have a ubuntu machine with multiple users some of whom have and have not root privileges. Above that I have a limited storage for the same machine. I really don't want to install the same software multiple times by different users. As a root user I want to install rust(rustc, cargo) once as root and made it available for all other users. Present recommended way of installing rust is by using curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh. I know using sudo will let me install a program globally but have seen thread which discourage using sudo for rust installation. How do we install rustc, cargo for all the users in the same linux machine?

EDIT:

I only want one root user to have the power of updating rustup and cargo and all other users has to use this copy.


Solution

This github issue says concurrent usage of rustup is unsafe and can corrupt its working area. If the intention of using a global rust toolchain is to maintain a consistent version, you can create a rust-toolchain file as specified in rustup-for-managing-rust-versions, but if it is to save disk space, I'm afraid there is no official documentation which says it is safe to do it.



Answered By - nohup
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,213,444

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing