You are not logged in.
Hi,
Firstly, sorry my bad English.
I installed a software and it requires arch command and domainname command. In CentOS, I can run it easily, but in Arch linux, It returned "command not found". I also searched on google how to resolve but it seemly nobody have the same problem. So how can I know which packages contain that command ? How can I find out a package if I know command only ?
Thank you.
Edit:
1. domainname command: install yp-tools
2. arch command: create a bash shell in /usr/bin/ with name "arch" and call "uname -m" inside. I also try to make an alias but it didn't work when I run my software.
3. To search package contain a command: #2
Thank you for helping me out.
Last edited by dotana (2017-05-22 00:38:15)
Offline
You can search through all Arch packages like this (meaning even the ones that are not installed):
sudo pacman -Fy # you only have to do this occasionally, not every time you want to search
pacman -Fs domainname
You can then list the files in a package like this:
pacman -Fl yp-tools
This here prints the description of the package:
pacman -Si yp-tools
I can't really find an "arch" command. There's files with that name in some packages, but none of them would install it as /usr/bin/arch. A program "domainname" is in that "yp-tools" package.
Last edited by Ropid (2017-05-21 15:24:42)
Offline
"arch" used to be part of util-linux; it was deprecated upstream a decade ago and is no longer included at all.
It is part up upstream coreutils, but not installed by default and not inluded in Arch.
Use uname.
Last edited by Scimmia (2017-05-21 15:40:46)
Offline
You can search through all Arch packages like this (meaning even the ones that are not installed):
sudo pacman -Fy # you only have to do this occasionally, not every time you want to search pacman -Fs domainname
You can then list the files in a package like this:
pacman -Fl yp-tools
This here prints the description of the package:
pacman -Si yp-tools
I can't really find an "arch" command. There's files with that name in some packages, but none of them would install it as /usr/bin/arch. A program "domainname" is in that "yp-tools" package.
Yes, I got the same with you, domainname command in yp-tools as your reply and I also cann't search "arch" command.
Offline
"arch" used to be part of util-linux; it was deprecated upstream a decade ago and is no longer included at all.
It is part up upstream coreutils, but not installed by default and not inluded in Arch.
Use uname.
I checked my system and both util-linux and coreutil had installed. But the "arch" command still not found.
I tested my server and found that "uname" and "arch" are 2 different command.
"uname" command return : Linux
"arch" command return: x86_64
Offline
-m, --machine
print the machine hardware name
Offline
uname --help
Please make more of an effort to help yourself; don't expect to have your hand held here.
Offline
You can also use pkgfile to find out ownership:
% pkgfile domainname
extra/yp-tools
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
man 1 uname wrote:-m, --machine
print the machine hardware name
Oh, I forgot call help function. Thank you.
I solve my problem by creating a bash shell in /usr/bin named arch with command uname -m and it's seemly ok now.
Offline
uname --help
Please make more of an effort to help yourself; don't expect to have your hand held here.
OK. Thanks so much.
Offline
I solve my problem by creating a bash shell in /usr/bin named arch with command uname -m and it's seemly ok now.
I'd recommend to put your file in /usr/local/bin instead of /usr/bin. This /usr/local/bin location should be in $PATH same as /usr/bin is so your program will still work. Putting the file in that other /usr/local location is not really needed here, but you will more easily find your own files if you don't mix it with locations where pacman will install things, and you will be sure that you don't clash with names used by Arch packages.
Last edited by Ropid (2017-05-22 01:26:18)
Offline
dotana wrote:I solve my problem by creating a bash shell in /usr/bin named arch with command uname -m and it's seemly ok now.
I'd recommend to put your file in /usr/local/bin instead of /usr/bin. This /usr/local/bin location should be in $PATH same as /usr/bin is so your program will still work. Putting the file in that other /usr/local location is not really needed here, but you will more easily find your own files if you don't mix it with locations where pacman will install things, and you will be sure that you don't clash with names used by Arch packages.
Thank you for your advice. I will do it.
Offline