How to install a package from AUR that additionally needs dependent AUR packages

So. I am using ArchLinux with i3 window manager (in short there is no proper working environment). I am new to Arch Linux

I am trying to install this package called "shutter" which will help me take a screenshot.

Now I tried to install the "shutter"

sudo pacman -S shutter

      

Unfortunately the shutter is not available in the pacman repository (or whatever it is called, sorry) I knew it was not available, but I just wanted to try it and went and tried it.

The reason I knew it was not available was because it was listed in the AUR. The packages in the AUR are now packages that are not in the main repository. Good. I am downloading a package from his git and trying to make it.

git clone aur.blah.blah.shutter.git
cd shutter
makepkg -s

      

Now this is the error I am facing.

[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 have carefully studied this list and realized that these dependency packages like gnome-perl and others are not themselves available in the main pacman repository, but are present in the AUR. So it makes sense why pacman can't find the target.

To check what I tried:

[pc@PC shutter]$ sudo pacman -S gnome-perl
error: target not found: gnome-perl

      

So, this "gnome-perl" and other dependencies are also part of the AUR, and so when "makepkg" tells pacman to install, pacman simple does not work.

So, How can I install such packages from the AUR that depend so much on other AUR packages?

Thank you in advance. If my concepts are wrong. Please guide. Thanks again.

PS: I did sudo pacman -Syyu but no luck, after that these packages are not part of the main repo and are in the AUR, so updating pacman's mirror list and system update should not fix it.

+3


source to share


4 answers


You can tell Cower recursively download AUR depending AUR package, specifying the boot option -d

twice as: -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 inserted AUR

: pass this option twice to extract uninstalled AUR dependencies (done recursively). But to be honest, Cower only deals with AUR.;)

(dependencies on the main Repo arch (non-AUR) already, of course, take care of the underwater command management makepkg

.)

When installing, it is probably best to download all AUR packages into one dedicated folder and leave them there. Cower keeps track of where packages have been downloaded and installed. (My AUR packages are loaded into /home/myUsername/AUR-packages

because I am the only user.) It all depends on your situation.

First you need to run makepkg -sic

(or any options) in each AUR dependency folder. Then in the folder of the main AUR package.



Update:

To check if there are updates for the installed AUR packages:

  • cower -u

  • then combine -u

    with -dd

    to also check and recursively load all AUR dependencies: cower -udd

    (or do it all at once)

  • then first cd

    into each AUR dependency folder and run makepkg -sic

    (or whatever other options you normally use)

  • then go to the folder of each top / main AUR package ( no dependencies ) you actually installed and want to use) and run makepkg -sic

    (or whatever other options you normally use).

Don't forget that there is also a verbosity option -v

that will also allow you to see all other packages that have been checked for updates. Not only those with updates.

The more AUR packages you have installed, you will find that this requires automation by one or more scripts.

+2


source


In case you find it helpful, this is a simple bash function that tries to download and install a package list. Of course, it does not 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
}

      

Usage example (arguments are a 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: The original code I posted had some problems because it was pulled from a larger script.



Edit 2: I've made some progress trying to install this 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 may be other packages already installed).

Edit 3: I had to manually install gnome-vfs-nosmb because it was conflicting with gnome-vfs.

Edit 4: Finally! after filling in all the remaining packages, I got it to work. But it would probably be nice to ask Dev to update GTK3 or similar; It looks like the project was updated in 2014 ...

shutter

+2


source


You may find the AUR package manager useful.

I personally use yaourt, it is very simple and automatically resolves dependencies.

It's very easy to install, just follow the instructions:

Yaourt official website

To install a package (and all its dependencies) run:

yaourt -S shutter

      

+1


source


You can use Yaourt.

You can install it by adding the repository to your pacman.conf file

sudo nano /etc/pacman.conf

      

Add this to the REPOSITORS section:

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

      

Update pacman database and install yaourt

sudo pacman -Sy yaourt

      

Now you can install your package with: yaourt shutter

+1


source







All Articles