Reputation: 185
So. I am using ArchLinux with i3 window manager (In short no proper Desktop Environment). I am new to Arch Linux
I am trying to install this package called "shutter" which will help me to take a screenshot.
Now, i tried installing "shutter"
sudo pacman -S shutter
Unfortunately, shutter is not available in the pacman repository (Or whatever it is called, sorry) I knew its not available, yet I just wanted to try and went ahead and gave it a try.
The reason why I knew it was not available was cause it was listed in AUR. Now packages in AUR are the one which are not there in the main repository. Fine. I download the package from its git and tried "making" it.
git clone aur.blah.blah.shutter.git
cd shutter
makepkg -s
Now this is the error I faced.
[pc@PC shutter]$ makepkg -s
==> Making package: shutter 0.93.1-11 (Thu May 18 19:05:21 UTC 2017)
==> Checking runtime dependencies...
==> Installing missing dependencies...
[sudo] password for pc:
error: target not found: gnome-perl
error: target not found: perl-gnome2-wnck
error: target not found: perl-gtk2-imageview
error: target not found: perl-gtk2-unique
warning: skipping target: perl-xml-simple
==> ERROR: 'pacman' failed to install missing dependencies.
Now, I saw this list carefully and realised that these dependency packages, for example, gnome-perl and other, are themselves not available in pacman's main repo but are present in AUR. So it makes sense why pacman is not able to locate the target.
To verify I tried :
[pc@PC shutter]$ sudo pacman -S gnome-perl
error: target not found: gnome-perl
So Yes, this "gnome-perl" and the other dependencies too are a part of AUR and hence when "makepkg" tells pacman to install it, pacman simple fails.
So, How am I suppose to install such packages from AUR which are further dependent so heavily on other AUR packages?
Thank You in advance. If my concepts are wrong. Please guide. Thanks again.
PS : I did sudo pacman -Syyu, but not luck, afterall these packages are not the part of main repo and are in AUR so updating pacman mirrorlist and system update should not fix it.
Upvotes: 8
Views: 12899
Reputation: 1366
In case it is useful to you, this is a simple bash function that tries to download and install a list of packages. Of course it doesn't do dependency resolution, so you need to install dependencies before the packages that depend on them.
aur_manual_install() {
[[ ! -d aur_packages ]] && mkdir aur_packages
pushd aur_packages
for PKG in "$@" ; do
curl -o ${PKG}.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/${PKG}.tar.gz
tar zxvf ${PKG}.tar.gz
rm ${PKG}.tar.gz
pushd ${PKG}
makepkg -csi --noconfirm
popd
done
popd
#rm -rf aur_packages # Uncomment if you want to clean up after install
}
Example of usage (the arguments are the list of packages to install in order):
aur_manual_install cower-git pacaur
Maybe you want to add set -e
to stop in case of error, etc.
Edit 1: original code I posted had some issues because it was extracted from a bigger script.
Edit 2: I made some progress trying to install that package:
aur_manual_install \
gnome-perl gnome-vfs gnome-vfs-nosmb gnome-vfs-perl gnomecanvas-perl libbonobo libbonoboui libgnome libgnome-data libgnomeui orbit2 perl-gnome2-wnck perl-gtk2-imageview perl-gtk2-unique shutter
(There are probably other packages that were already installed).
Edit 3: I had to install gnome-vfs-nosmb manually because it conflicted with gnome-vfs.
Edit 4: finally! after filling in all the remaining packages, I got it to work. But probably would be a good idea to ask the dev to update to GTK3 or similar; whoops, apparently the project was last updated in 2014...
Upvotes: 2
Reputation: 73
You can tell Cower to recursively download AUR dependencies of an AUR package by specifying the download option -d
twice like so -dd
, -d -d
or --download --download
From man cower
:
OPERATIONS
-d, --download
Download target. Pass this option twice to fetch uninstalled dependencies (done recursively).
It would be much clearer if AUR
had been inserted : Pass this option twice to fetch uninstalled AUR dependencies (done recursively). But to be fair Cower only deals with the AUR. ;)
(Main Arch Repo dependencies (non-AUR) are already taken care of underwater by the makepkg
command of course.)
When installing it's probably better to download all AUR packages to one dedicated folder and leave them there. Cower keeps track of where packages were downloaded to and installed from. (My AUR packages are all downloaded into /home/myUsername/AUR-packages
because I'm the only user.) It all depends on your situation though.
You first have to run makepkg -sic
(or whatever options) in the folder of each AUR dependency. Then in the folder of the main AUR package.
Updating :
To easily check if there are updates for installed AUR packages :
cower -u
then combine -u
with -dd
to also check and recursively download all AUR dependencies : cower -udd
(or do this right away)
then first cd
into the folder of each AUR dependency and run makepkg -sic
(or whatever options that you normally use)
then go into the folder of each top/main AUR package (non-dependency the one that you actually installed and want to use) and run makepkg -sic
(or whatever options that you normally use).
Don't forget that there is also a verbosity option -v
which will also let you see all other packages which were checked for updates. Not just the ones with updates.
The more AUR packages you have installed, you will realise that this needs automation by one or more scripts.
Upvotes: 3
Reputation: 100
You can use Yaourt .
You can install it by adding a repository to your pacman.conf
sudo nano /etc/pacman.conf
Add this in 'the REPOSITORIES' section :
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
Update the pacman database and install yaourt
sudo pacman -Sy yaourt
Now you can install your package with : yaourt shutter
Upvotes: 1
Reputation: 147
You might find useful some AUR package manager.
I personally use yaourt, it's very simple and automatically resolve dependencies.
It's very easy to install, just follow the instructions:
To install a package (and all of it dependencies) run:
yaourt -S shutter
Upvotes: 1