I need your expertise, I am trying to learn rpms. I am following an instructional video from pluralsight. Where he download zsh via “yumdownloader --source” in the root directory. As per his instruction I ran the following
rpm -i zsh-5.0.2-34.el7_8.2.src.rpm
went into /root/rpmbuild/SOURCES/ and extracted zsh-5.0.2.tar.bz2 and went into zsh-5.0.2 directory
ran ./configure
ran make
ran make install
All run successfully, as shown in the tutorial video. The question is when he ran zsh anywhere it changed to zshell but in my case I ran zsh in my current directory and it said bash: zsh: command not found.
Can you help me figure what I have overlooked, this system is lab machine so I can provide any logs and configuration file you needed to help me fix this issue I am encountering.
.
Ah, got it. I’m paranoid, so I don’t allow root logins on any of my machines, and forget that others use it.
So, it looks like it built and installed, so it must be either 1) /usr/local/bin is not on your path, or 2) the zsh on the path does not have executable permissions.
For 1, echo $PATH and see if it looks correct. The path is usually built at login time, so log out and back in might fix it. But, #2 might affect #1, if there aren’t any executables in a directory (or it doesn’t exit), then it’s not included in $PATH, so…
For 2, ls -laF /usr/local/bin/zsh and see if it has the ‘x’ bits set for you. This is more or less what I’d expect to see for your executable.
[tux@server1 ~]$ zsh
server1% which zsh
/usr/local/bin/zsh
Because the way I login as root is using “sudo su” so I logged off and login back as root using “su” only and this time it works.
[tux@server1 ~]$ su -
Password:
Last login: Wed Feb 9 06:02:40 ACDT 2022 on pts/1
Last failed login: Wed Feb 9 06:07:21 ACDT 2022 on pts/1
There was 1 failed login attempt since the last successful login.
Yeah, the limited path options in root are a semi-security feature, I think. Makes root less dangerous by limiting the command scope to only those binaries that are part of the base system, not something in /usr/local that a random user plopped in and shadowed the “real” command.