Failed to read AUR data from /var/tmp/pamac/packages-meta-ext-v1.json.gz

Everytime I run pamac upgrade --aur --force-refresh I get the following two messages:

pamac upgrade --aur --force-refresh                                                                                                                               
Preparing...
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Multiple identities can be used for authentication:
 1.  Medin (medin)
 2.  Med (med)
Choose identity to authenticate as (1-2): 1
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...                                                                                                                                                                              
Failed to read AUR data from /var/tmp/pamac/packages-meta-ext-v1.json.gz : <data>:40596:543: Parse error: scanner: unterminated string constant                                                
Failed to read AUR data from /var/tmp/pamac/packages-meta-ext-v1.json.gz : <data>:53938:544: Parse error: scanner: unterminated string constant
Nothing to do.
Transaction successfully finished.

Even purging /var/tmp/pamac/ has no effect.

What does this return:

ls -al /var/tmp/pamac

How did you “purge” it? sudo rm -rf /var/tmp/pamac should be sufficient.

Or is that partition maybe out of space and wrote the file only partially? The file is updated every five minutes on the server, so wait a bit and try again.

1 Like

I emptied that folder using Dolphin.

I still have enough free space on my ext4 partition.

After waiting for sometimes, I’m still getting those errors:

Failed to read AUR data from /var/tmp/pamac/packages-meta-ext-v1.json.gz : <data>:34616:343: Parse error: scanner: unterminated string constant                                                
Failed to read AUR data from /var/tmp/pamac/packages-meta-ext-v1.json.gz : <data>:45679:403: Parse error: scanner: unterminated string constant

Issue

[nls@usb ~]$ sudo pamac update -a
[sudo] password for nls: 
Warning: Building packages as dynamic user
Warning: Setting build directory to /var/cache/pamac
Preparing...
Synchronizing package databases...
Failed to synchronize AUR database                                                                                           
** Message: 09:54:57.612: aur_plugin.vala:332: downloading AUR data
Failed to read AUR data from /var/tmp/pamac/dbs/sync/packages-meta-ext-v1.json.gz : Error opening file /var/tmp/pamac/dbs/sync/packages-meta-ext-v1.json.gz: No such file or directory
Nothing to do.
Transaction successfully finished.
[nls@usb ~]$ sudo pamac update -a

Your tip, trick

Solved my issue, thanks.

That’s where your problem lies. sudo should not be used with pamac.

3 Likes