Trouble updating from AUR

I’m having little luck in updating and upgrading in Manjaro xcfe as each time I use the command line - sudo pamac update (or upgrade) I get a whole spiel that looks as though it’s doing the job but no, comes up with “Failed to synchronize AUR database”, and at the end of what looks like it could be working the request it then comes up near the end with “==>Error: PKGBUILD does not exist”.

I’ve gone to every known page on this site to try to fix the problems as it’s really bugging me. I’m a 71 year old who loves linux and am not as good on code as I’d like to be, so please be kind. :wink:

That indicates that the package you try to update does not exist (anymore).
You could (temporarily at least) remove that package before you proceed.

Why not try updating the base system before you tend to anything from AUR?

sudo pacman-mirrors -f
sudo pacman -Syu

I’m not familiar with pamac, but you can instruct it to exclude the AUR packages as well.
pacman doesn’t even deal with those

2 Likes

I think the general advice is never to use sudo with pamac - pamac will ask for the password if it needs elevated privileges; see this page for instance, which says

Using sudo with pamac can have undesirable effects, especially when building packages. if in doubt, don’t use sudo. Pamac will ask for escalated rights if needed.

I’m not saying that is causing your current problem, but it is likely to cause a problem eventually.

You will maybe get more responses if you post the entire command and output, since context is often useful. Remember to properly format any output (e.g. paste the output, highlight it all, and click the </> button in the message toolbar).

2 Likes

It probably won’t be accepted here but I use this AUR package to do my updates:

Disable AUR in the Add and Remove Applications app → Preferences.

Then open a terminal and create a list of known alien packages (AUR)

pacman -Qqm > ~/alien-pkgs.txt

With the names of the packages in place remove all aliens

sudo pacman -R $(pacman -Qqm)

After this has been done run a full system sync

sudo pacman -Syu

When done and system has been restarted - evaluate the file ~/alien-pkgs.txt if you need to rebuild one or two packages.

I also have Xfce, and use AUR (for a few packages (unavailable in official repos) The easiest way to tell if your AUR package still exists is to run: pamac search packagename (no sudo). If it finds it then you’ll know it still exists. If not try another search on a different AUR package, just to be sure AUR is working, eg pamac search recorder$, which should show a number of AUR packages ending in ‘recorder’,

Cave: my opinion :nerd_face:

By far the easiest way (for me) is to use the AUR Website to look for packages - and for normal packages as well.

https://aur.archlinux.org/

Arch Linux - Package Search

For the normal repo

Branch compare for Manjaro

can also be used - but there is no description available, just the name and version for each branch of Manjaro.

Thanks for the help, but none of those lines of code worked at all. :cry:

I did that but what came up was a lot of nothing to me. Sorry, I know you and others are trying to help and I thank you all for that.

What did it do?
Especially the last of the three lines?
We need to see what you saw in order to help.

1 Like

Hi Smoky - Not sure what you mean by ‘a lot of nothing’ Please can you give me the exact name of your AUR package that you’re having problems with.

1 Like

Using the Pamac CLI - Manjaro

Warning

Using sudo with pamac can have undesirable effects, especially when building packages. if in doubt, don’t use sudo. Pamac will ask for escalated rights if needed.

to check for updates and force refresh of databases

pamac update --aur --force-refresh

If pamac fails to synchronize a database, check if the download mirrors are up to date

pacman-mirrors

Manjaro Repository - Status of mirrors

2 Likes

The ideal situation (followed more in Plasma than other DE’s) is that you should never need to ‘sudo’ to run stuff. If you try and it fails, then you can press AltS to prepend sudo and run the same command again.

  • Try pacman -Syu Then press AltS

It can be confusing as ‘pacman’ and ‘pamac’ have all the same jumbled letters…

For example, kate /etc/default/grub opens the file, you can edit - and the original is not touched until you try to save, and THEN it will request privilege to save.

The same goes for pamac… pamac update is the way to go.

Fix it:

If it’s only recent, maybe a snapshot…

Otherwise:

sudo rm -rf /var/tmp/pamac/dbs/*
sudo pacman -Scc
sudo pamac clean -b

This will remove lock files, clean package cache, and build files.

Now force pacman to reload repos (this is not to be done too often, as it loads the server a bit).

sudo pacman -Syy

Fix mirror issues

sudo pacman-mirrors --continent && pacman-mirrors

You need to end up with some nice green listings there…
Then brutally upgrade the system:

sudo pacman -Syu --overwrite

Moving on…

Update with pacman first, then pamac with NO sudo.

If you have flatpaks, do those too. Here’s a one liner for pacman, pamac AND then one to include flatpak also:

❯ sudo pacman -Syu && pamac upgrade --aur

❯ sudo pacman -Syu && pamac upgrade --aur && flatpak upgrade

Remember also to check:

pacdiff -o

If you’re as forgetful as I am, then make an abbreviation (fish) or alias (zsh or bash) like this:
:play_button: FISH

abbr up 'sudo pacman -Syu && pamac upgrade && flatpak upgrade'

:play_button: Bash/zsh

alias up='sudo pacman -Syu && pamac upgrade && flatpak upgrade'

Let us know how you get on :wink:

Is this a bug?

Moving on from here, it would be a good idea to list this as a bug against pamac… that there is no warning about running it with sudo, and that running it with sudo should require deliberate steps to overcome a warning.

I have previously posted about this problem… as you can see from my terminal runningi sudo pamac:

#!> sudo pamac
[sudo] password for ben: 
Warning: Do not use 'pamac' with 'root' privileges. It can cause permission issues.
Are you sure you want to continue? (y/n): n

You can implement this:

Good luck :vulcan_salute:

4 Likes

You can add the --no-aur flag to pamac, which will allow you to do the upgrade. Then you can worry about your AUR packages afterwards.

7 Likes

:question:

Custom packages built and installed using custom scripts like AUR is unsupported.

Before we can attempt to help you; your must remove any and all custom packages.

There must have been some response..

Why do you think it not work?

What was the response?

The URL to the aur.archlinux.org didn’t make any sense and not sure what to do with the other two you mentioned.

The helpers are asking for more info when you say their commands didn’t help. So you need to select, copy and paste here all the text output that was generated when you ran the commands that were given to you.

Similarly, when you tried to update the AUR package and failed, text must have been generated. Copy and paste the error messages.

2 Likes

Using KRunner, you can directly search the AUR. That URL is the URL for the AUR - and this post is about ‘trouble updating from AUR’.

I’m curious why you think this URL does not make any sense.

However, when you post - we want to understand if any errors persist with your system…

4 Days ago you stated ‘none of those lines of code worked at all’. You don’t quote original posts when you reply, so context is being lost… You can select and QUOTE like this:

You see the problem here - WE CANNOT SEE what ‘came up’. So not only is it nothing to you, but we can’t see it either.

Can I ask you to fix my bike, without sending you an image, or detailed information?

Moving On

So you can try opening Konsole. I choose Konsole because you can SELECT text with the mouse, you can COPY and then paste text here.

When pasting text here, type three ‘tilde’ like this:

~~~⏎Enter
^ControlV to paste the code
~~~⏎Enter

So if someone says:

you can try this: sudo pacman-mirrors --continent && sudo pacman -Syu

We need to see what happens.

From @anon33601770

sudo pacman-mirrors -f
sudo pacman -Syu

Now, after pasting the LONG output from the terminal, I also selected to HIDE it:

You can also click the :gear: icon in this webpage editor, and select ‘Hide Details’ for longer outputs… you can select the text and click this to hide something you already pasted.

sudo pacman-mirrors -f
⮞ sudo pacman-mirrors -f
[sudo] password for ben: 
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  1.027 Bangladesh     : https://bd.mirror.vanehost.com/Manjaro/
  0.837 Indonesia      : http://kartolo.sby.datautama.net.id/manjaro/
  1.994 Japan          : https://mirror.phoepsilonix.love/manjaro/
  0.696 China          : https://mirrors.ustc.edu.cn/manjaro/
  0.184 Singapore      : https://mirror.freedif.org/Manjaro/
  0.978 Japan          : http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/
  0.200 Singapore      : http://ossmirror.mycloud.services/os/linux/manjaro/
  0.669 China          : https://mirrors.jlu.edu.cn/manjaro/
  1.077 Japan          : http://ftp.riken.jp/Linux/manjaro/
  ..... Georgia        : http://manjaro.grena.ge/
  0.125 Thailand       : https://mirror.kku.ac.th/manjaro/
  0.530 China          : https://mirrors.tuna.tsinghua.edu.cn/manjaro/
  1.232 Uzbekistan     : https://mirror.dc.uz/manjaro/
  1.540 China          : https://mirrors.sjtug.sjtu.edu.cn/manjaro/
  2.318 Iran           : https://repo.iut.ac.ir/repo/manjaro/
  1.419 Turkey         : https://ftp.linux.org.tr/manjaro/
::INFO Writing mirror list
::Thailand        : https://mirror.kku.ac.th/manjaro/testing/$repo/$arch
::Singapore       : https://mirror.freedif.org/Manjaro/testing/$repo/$arch
::Singapore       : http://ossmirror.mycloud.services/os/linux/manjaro/testing/$repo/$arch
::China           : https://mirrors.tuna.tsinghua.edu.cn/manjaro/testing/$repo/$arch
::China           : https://mirrors.jlu.edu.cn/manjaro/testing/$repo/$arch
::China           : https://mirrors.ustc.edu.cn/manjaro/testing/$repo/$arch
::Indonesia       : http://kartolo.sby.datautama.net.id/manjaro/testing/$repo/$arch
::Japan           : http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/testing/$repo/$arch
::Bangladesh      : https://bd.mirror.vanehost.com/Manjaro/testing/$repo/$arch
::Japan           : http://ftp.riken.jp/Linux/manjaro/testing/$repo/$arch
::Uzbekistan      : https://mirror.dc.uz/manjaro/testing/$repo/$arch
::Turkey          : https://ftp.linux.org.tr/manjaro/testing/$repo/$arch
::China           : https://mirrors.sjtug.sjtu.edu.cn/manjaro/testing/$repo/$arch
::Japan           : https://mirror.phoepsilonix.love/manjaro/testing/$repo/$arch
::Georgia         : http://manjaro.grena.ge/testing/$repo/$arch
::Iran            : https://repo.iut.ac.ir/repo/manjaro/testing/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
~                                                                                                      27s
⮞ 
sudo pacman -Syu
⮞ sudo pacman -Syu
[sudo] password for ben: 
:: Synchronising package databases...
 core is up to date
 extra is up to date
 multilib is up to date
 chaotic-aur is up to date
:: Starting full system upgrade...
 there is nothing to do

If this fails, then the next suggestion is from our own SuperGuru (who sometimes posts very complicated fixes for things we assume are simpler - but who can be trusted not to post things that ‘do not work’).

pacman -Qqm > ~/alien-pkgs.txt

This creates a list of packages from AUR and pastes them into a text file.

Now you have a FULL LIST of your AUR packages, and can REMOVE them all using that list:

sudo pacman -R $(pacman -Qqm)

Then you should have no trouble running this:

sudo pacman -Syu

Then, once you have success, you must look at the file ~/alien-pkgs.txt to see what has been removed. Perhaps you want to re-install some of those packages.

You must COPY and PASTE these commands into Konsole. Then you must COPY and PASTE the text from Konsole and paste them back here.

  • This does not have to mean anything to you, you do not need to understand everything…

My post later on addresses the common problem that we get confused between ‘pamac’ and ‘pacman’ and mix up ‘sudo pamac -Syu’ or ‘sudo pacman upgrade’… getting old means things get fuzzy, and having dyslexic tendencies means we start making stupid mistakes.

When we start getting into a mess, we must very carefully, step by step, take action to fix the mess. I hope you will succeed if you haven’t already given up.

1 Like

It was a response and addition to @bendipa1 - he mentioned searching the AUR.

These are links to search interfaces.
The first let’s you search through AUR - for your package or for any other.
Intention was to check whether it even exists anymore, based upon the error you reported
(If it doesn’t: remove it so the update can continue).

The other two are also search interfaces.
The first two should be self explanatory, the third not so much, but it is clearly a search interface (to me). :man_shrugging:

1 Like
Finished with result: success
Main processes terminated with: code=exited, status=0/SUCCESS
Service runtime: 1.303s
CPU time consumed: 41ms
Memory peak: 4.6M (swap: 0B)
Generating shiboken2 information...
Running as unit: run-p1903932-i1903933.service
==> ERROR: PKGBUILD does not exist.
Finished with result: exit-code
Main processes terminated with: code=exited, status=12/n/a
Service runtime: 87ms
CPU time consumed: 76ms
Memory peak: 6M (swap: 0B)
Error: Failed to prepare transaction: Failed to clone shiboken2 build files

Mod: Added code markers - please learn to paste code

HOW TO PASTE CODE

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks ```, before AND after the pasted text. Like this:

pasted text

Or three (3) tilde signs, like this: ~~~

pasted text

Alternatively, select all pasted text, and click the </> button on the taskbar - which will indent the whole pasted section with one TAB, causing it to render the same way as described above.

I’ve done all asked and this is still coming up when I do an sudo pamac upgrade or update.

Sorry, but this is confounding me as it just went on the blitz one day without my input, it just has a mind of it’s own it seems.