I can easily install any package using Yay. But whenever I try to install the same AUR package first cloning it using Git and then running makepkg , the resultant file is not tar.xz instaed it is tar.gz which I think cannot be installed by pacman. How to install the package from tar.gz using command line.
Either you have set .tar.gz
as the archive type within your /etc/makepkg.conf
or you are building a source archive not the binary package.
Which flags are you passing to makepkg
?
More information about using the AUR:
https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_and_upgrading_packages
and makepkg:
Building from the AUR, after you git clone
the specific AUR package, you run makepkg -si
and it will install the package for you after it’s compiled. Be sure to read man makepkg
.
The output type from makepkg is controlled by the PKGEXT
directive in /etc/makepkg.conf
Here is what mine looks like.
PKGEXT='.pkg.tar.zst'
It doesn’t really matter much though.
You should be able to install it with pacman -U /path/to/filename
PS. Using zstd make a reasonably large difference in the time it takes a big package to compress.
yes it is tar.gz. As I am new to linux I have not touched makepkg.conf
Are you sure that is the output of the package and not one of the source files it is downloading to build the package?
I suspect you have run makepkg -S
rather than makepkg -s
(or as dalto says, you are trying to install a source archive, not the final package).
It’s a good idea to read and re-read the Arch wiki pages. It will be difficult to understand at first (it is very information-dense) but all the information is there.
Thanks!
I am trying to make sense of the documentation.
Thanks a lot Jonathon. Actually I am surprised in almost every how to website/ tutorial it is mentioned to use makepkg -Si and this is what I was also doing. But the moment I did makepkg -s it worked smoothly.
This was my first question which I posted after lots of hesitation. But I am really impressed by the prompt supportive replies. It has motivated me to put more questions whenever I find any difficulty. thanks once again to you all.
I will definitely re read the documentation.
If required dependencies are missing, makepkg will issue a warning before failing. To build the package and install needed dependencies, add the flag
-s
/--syncdeps
:$ makepkg --syncdeps
Source: wiki.archlinux
-S, --source
Do not actually build the package, but build a source-only tarball that does not include sources that can be fetched via a download URL. This is useful for passing a single tarball to another program such as a chroot, remote builder, or a tarball upload. Because integrity checks are verified, all source files of the package need to be present or downloadable.
Source: archlinux.org
The documentation is just two commands away:
man makepkg
: explains all the different switches and parameters
man makepkg.conf
: explains the options in /etc/makepkg.conf
This should help you get a better knowledge, if you don’t understand something, just ask