Unable to search and install packages from AUR using pamac

Hi there!

I’m currently experiencing issues on searching and installing packages from AUR. I installed Manjaro previously, all worked well. I’ve been able to install Visual Studio Code from AUR using pamac install visual-studio-code-bin (AUR repositories installation are already enabled).

Today, I reinstalled Manjaro. I thought all works well just as before. But, when I tried to search & install VSCode from AUR, all I’m getting are these errors:

pamac search visual-studio-code-bin 
Synchronizing package databases...
failed to retrieve some files
Failed to read AUR data from /var/lib/pacman/sync/packages-meta-ext-v1.json.gz : Error opening file /var/lib/pacman/sync/packages-meta-ext-v1.json.gz: No such file or directory
pamac install visual-studio-code-bin
Synchronizing package databases...
failed to retrieve some files
Failed to read AUR data from /var/lib/pacman/sync/packages-meta-ext-v1.json.gz : Error opening file /var/lib/pacman/sync/packages-meta-ext-v1.json.gz: No such file or directory
Error: target not found: visual-studio-code-bin

both are getting the same error.

I don’t know what might be the problem, I already followed this same issue posted on this forum https://forum.manjaro.org/t/failed-to-read-aur-data-from-var-tmp-pamac-packages-meta-ext-v1-json-gz/148680. Unfortunately, it didn’t worked for me.

Please keep in mind - the AUR is unsupported - and you are strongly advised to use unstable branch if AUR is a must-use. [Need-To-Know] About Manjaro and AUR

pamac update --aur --force-refresh

Or open the Add & Remove Software app - click the :hamburger: and select Refresh Databases

1 Like

Refresh the list of mirrors?
I don’t know where to reach that function through the GUI - but somewhere behind the hamburger menu, the three dots.
or in terminal:
sudo pacman-mirrors -f

I also did it already. nothing changed.

Computer/Software engineer advise - restart the system.

Once there were four engineers traveling in a car. While they were traveling to their destination the car stalled on them.
Then the first engineer who was a mechanical engineer said, “don’t worry its probably engine problems. I will just pop open the hood and take a look at the motor”.
Then the second engineer, who was an electrical engineer, said, “no, no, no. It is an electrical problem. Just let me look at the fuse box and I will find the problem”.
The third engineer, who was a chemical engineer, said, “its just a problem with the fuel. Flush out all of the gas and replace it with new gas and you will see that the car will be fine.”
Then the three engineers looked at the fourth who was a computer engineer. And his response was… “Why don’t we just get out of the car, shut all of the doors, and then open them again and get back in and start it!”

Ensure the folder /var/tmp/pamac does not exist.

sudo rm -r /var/tmp/pamac
2 Likes
$ man pamac

SYNOPSIS
      pamac <operation> [options] [targets]


OPERATIONS

      pamac install [options] <package(s)>
          Install packages from repositories, path or url

      pamac build [options] [package(s)]
          Build packages from AUR and install them with their dependencies

1 Like

I’ve been able to install that AUR package because I edited the /etc/pamac.conf and uncommented the EnableAUR.

Shouldn’t pamac always be run without sudo?
It will prompt for authorization.

This is what I see initially after refreshing the mirrors:
pamac build visual-studio-code-bin
Preparing...
Checking visual-studio-code-bin dependencies...
Resolving dependencies...
Checking inter-conflicts...

To install (1):
  lsof                    4.99.4-1   (Required By: visual-studio-code-bin)  extra  150.4 kB
To build (1):
  visual-studio-code-bin  1.100.3-1                                         AUR

Total download size: 150.4 kB
Total installed size: 381.1 kB

Edit build files : [e] 
Apply transaction ? [e/y/N]

That could have also been done through the GUI → enable AUR support

And for the record, refreshing mirrors is unrelated to building an AUR package as it is a requirement for the system to be up-to-date when building a custom package.

yes - my bad - muscle memory

But is has become less important after pamac developer changed the behavior from reading metadata /var/tmp/pamac to using the pacman metadata as a shared resource.

update: I did what y’all recommended. nothing worked out :sob:

pamac build visual-studio-code-bin

Or

sudo pacman -Syu base-devel
git clone https://aur.archlinux.org/visual-studio-code-bin
cd visual-studio-code-bin
makepkg -iscC

Yes - well, maybe :grimacing:
When I did:
pamac update --aur --force-refresh

I got this response (I do have some, probably outdated, AUR packages installed):
pamac update --aur --force-refresh
Preparing...
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: JE (jo)
Password: 
==== AUTHENTICATION COMPLETE ====
Synchronizing package databases...
Refreshing core.db...                                                           
Refreshing extra.db...                                                          
Refreshing multilib.db...                                                       
Refreshing core.files...                                                        
Refreshing extra.files...                                                       
Refreshing multilib.files...                                                    
Refreshing AUR...                                                               
Nothing to do.                                                                  
Checking ezra-bible-app-bin dependencies...
Checking nvidia-utils-beta dependencies...
Checking pulseaudio-ctl dependencies...
Checking localepurge dependencies...
Checking scid_vs_pc dependencies...
Checking pinta dependencies...
Checking midori-bin dependencies...
Checking stockfish dependencies...
Resolving dependencies...
Checking inter-conflicts...

To install (5):
  autoconf-archive            1:2024.10.16-2  (Required By: pinta)  extra  
  dotnet-runtime              9.0.4.sdk105-1  (Required By: pinta)  extra  
  netstandard-targeting-pack  9.0.4.sdk105-1  (Required By: pinta)  extra  
  dotnet-targeting-pack       9.0.4.sdk105-1  (Required By: pinta)  extra  
  dotnet-sdk                  9.0.4.sdk105-1  (Required By: pinta)  extra  
To build (8):
  ezra-bible-app-bin          1.17.0-1        (1.16.2-1)            AUR
  localepurge                 0.7.3.11-1      (0.7.3.10-1)          AUR
  nvidia-utils-beta           575.57.08-1     (555.52.04-2)         AUR
  midori-bin                  11.5-1          (11.4.1-1)            AUR
  pinta                       3.0-3           (2.1.2-2)             AUR
  pulseaudio-ctl              1.70-2          (1.70-1)              AUR
  scid_vs_pc                  4.26-1          (4.24-3)              AUR
  stockfish                   1:17.1-1        (1:16.1-1)            AUR

Total installed size: 448.1 MB

Edit build files : [e] 
Apply transaction ? [e/y/N]

You can safe discard the action - but it appears to be the method to update aur data.

That’s what I did.
I didn’t want to update these - it’s in a VM for testing stuff and I will remove them anyway later on.

But after this,

pamac build visual-studio-code-bin

… worked.

It probably would have worked without this prior step.

pamac search --aur visual-studio-code-bin
gives:

pamac search --aur visual-studio-code-bin
visual-studio-code-bin  1.100.3-1                                                                                                                                              AUR
    Visual Studio Code (vscode): Editor for building and debugging modern web and cloud applications (official binary version)
1 Like

What’s the output?

curl --head https://aur.manjaro.org/packages-meta-ext-v1.json.gz 

@bochard

You might consider using code (Visual Studio Code) from the official Manjaro repositories;

sudo pacman -S code

The build command alse worked for me, without issue;

pamac build visual-studio-code-bin