・ Beginners who started to touch Linux ・ Organization members who have been touched as such but have been robbed of Sudo
that is impossible. yum install
will not work without sudo
privileges. We strongly recommend that you contact your server administrator to install the required modules.
$ sudo yum install gcc #=> "username" is not in the sudoers file.
But don't be discouraged. There are ways to get similar results without using yum.
When installing software or libraries on Linux ――Determine the "installation location" (** path ) --Collects "other parts required for installation" ( resolves dependencies **) It does a job called ** package management **.
If I try to do this myself, I visit the page where the software is located on the Internet, directly specify the URL with softwarename.tar.gz
, extract it, and run the installation file with the prefix ...
Moreover, when I tried to move it, it was said that "Please install this package" and "This package version is not supported".
You need root
privileges to run yum install
, which will bring you this tedious task in almost perfect condition with the "Come on" instruction. Only when you lose root
will you realize its importance. If you've arrived at this article, you're in that state right now.
yum usually installs the software in a folder directly under the root directory. For example, / usr / bin is usually "in the path" from the beginning, and commands can be used to update installed software. Neither the ls
command nor the cd
command can be executed unless they are all "in the path".
$ whereis ls #=> ls: /usr/bin/ls
If you don't have write permission (sudo
) to root privileges, you can install various packages in your home directory (/ home / username /, or ~ /, or $ HOME). Homebrew was born from this idea, and Linuxbrew.
However, this Linuxbrew itself has a dependency, and some libraries need to be installed by a user with root privileges in advance. Before you have a headache, let the administrator know what's going on and aim for an immediate solution. (I can't deny the feeling that I wouldn't have a hard time if I could do this in the first place ...)
sudo yum groupinstall 'Development Tools'
sudo yum install curl file git
sudo yum install libxcrypt-compat # needed by Fedora 30 and up
$ git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew
$ mkdir ~/.linuxbrew/bin
$ ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin
$ eval $(~/.linuxbrew/bin/brew shellenv)
important point -Some libraries are not supported by Linuxbrew. -Once the first dependency is resolved, it can be installed and executed without affecting the directory that is the root area.
Recommended Posts