You are not logged in.

#1 2011-09-15 23:48:19

art84
Member
Registered: 2010-12-05
Posts: 41

[SOLVED] pacman error: cannot open package file

Hi

I didn't use my Arch box for a while and today launched it.
I had to install the "p7zip" package, but I'm a "build everything from sources" guy and I tried to install it from source as always. Unsuccessfully: it required nasm.
Decided to install it using pacman, to get it done quickly.
So, I've got the nasm package and uploaded it to my Arch machine (it has no inernet connection, I use NFS to share files).

Executed

pacman -U ./nasm-2.09.10-1-i686.pkg.tar.xz

and for my surprise I've got:

loading package data...
error: './nasm-2.09.10-1-i686.pkg.tar.xz': cannot open package file

Then I tried to run  pacman -U for one of "core" packages from the original media (2010.05) and the same result. Some time ago it was working fine.
It gets this error for every file.
The tar.gz file is not broken, I can browse it within Midnigh Commander and get any file .

What could be wrong? Any ideas?

Last edited by art84 (2011-09-16 17:37:33)

Offline

#2 2011-09-16 00:32:28

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: [SOLVED] pacman error: cannot open package file

Ideas:
1. Check the pacman log
2. Try syncing the database.  The problem might be there.
3. There really is a god, and he doesn't like the p7zip package being on your computer.

Edit: Since you don't have an internet connection, I suppose you could simply download the .db files and just manually copy them into the sync folder.

Last edited by the sad clown (2011-09-16 00:35:28)


I laugh, yet the joke is on me

Offline

#3 2011-09-16 01:01:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman error: cannot open package file

What's the output of 'pacman -V'?

Offline

#4 2011-09-16 01:08:23

Techman084
Member
Registered: 2011-09-01
Posts: 11

Re: [SOLVED] pacman error: cannot open package file

Good evening art84,

You might want to try an absolute directory such as this:

 /home/yourusername/directory/wherever the package is.pkg.tar.gz 

or wherever you have your package. Additionally, you may want to make sure that you're in the directory that the package is in if you use ./package.pkg.tar.gz since I just ran that command even without the package there and I got the same error as you.

Hope this helps!

Offline

#5 2011-09-16 08:10:41

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] pacman error: cannot open package file

@Techman084:

Of course I  have ran it in the directory where the package is located. And yes, I also tried to use it with an absolute path like.

@karol

# pacman -V

 .--.                  Pacman v3.3.3 - libalpm v4.0.3
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2009 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

@the sad clown

1. /var/log/pacman.log

...
[2010-12-12 13:46] installed kernel26-headers (2.6.33.4-1)
[2010-12-12 14:07] installed r8168 (8.020.00-1)
[2010-12-20 19:33] installed iperf (2.0.5-1)
[2010-12-26 14:46] installed slang (2.2.3-1)
[2010-12-26 15:45] installed mc (4.7.4-1)

2. Why to synchronize? And how?   pacman -Syu   ?
  I have the original 2010.05 distro installed without any updates. Only console. A few packages installed: ethtool, mc, slang, etc. So, I don't need to have it synchronized to the last versions of everythig (if I correctly understood the goal of the sync)

3. I have already that p7zip package on my PC smile  I had to do it manually  ... but to be clear, it doesn't work with any package, not only with "p7zip" or "nasm"

Offline

#6 2011-09-16 08:46:32

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] pacman error: cannot open package file

You definitely can't get a net connection to that box? Because you badly need to update everything (yes, I said everything) and getting on the net is (almost) the only way to do that.

There is an offline way, as hinted at by the sad clown above - here's an outdated wiki page to give you the general idea.

Last edited by tomk (2011-09-16 08:47:15)

Offline

#7 2011-09-16 10:57:23

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] pacman error: cannot open package file

tomk

The problem is that it worked fine before and now it doesn't.
It has nothing to do with "update everything" because everything was fine without this full update. As I said, it's the standard 2010.05 distro without any upgrades, only a few packages (ethtool, slang, mc) installed from offline files like I'm trying to do now.
I would like to know if is it related to the "xz" packge or maybe it is broken or smth like this, if someone encountered this type of error.

Offline

#8 2011-09-16 11:20:12

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED] pacman error: cannot open package file

Updating xz without updating pacman/libarchive can break pacman, same thing with other libs. Short story: partial updates does not work in binary based rolling release distroes.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#9 2011-09-16 12:21:12

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] pacman error: cannot open package file

And in this case, pacman is old enough that it doesn't support reading of xz compressed packages. `pacman -Syu' is the only supported upgrade path.

Offline

#10 2011-09-16 12:23:41

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] pacman error: cannot open package file

Well, it seems something is broken and it has nothing to do with "update everything"
I've got the same standard 2010.05 distro version running on anoher PC and there everything is OK as it was on the problematic machine before.
Exactly the same software environment and the same nasm package I reported in the first post, another hardware (but of course it's not related to hardware):

# pacman -U ./nasm-2.09.10-1-i686.pkg.tar.xz
loading package data...
checking dependencies...
(1/1) checking for file conflicts                   [#################################################################################] 100%
(1/1) installing nasm                               [#################################################################################] 100%

Anyway, thank you guys for your comments and help.

Offline

#11 2011-09-16 12:30:11

Barafu Albino Cheetah
Member
From: Moscow
Registered: 2011-09-16
Posts: 34

Re: [SOLVED] pacman error: cannot open package file

You have to find nasm package, as well as p7zip package, that was... err.. packaged exactly in May 2010. You can't install newer packages on old system, due to package syntax being upgraded.

Offline

#12 2011-09-16 12:32:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] pacman error: cannot open package file

Just a clarification: 2010.05 is the installer version, not the distro version.

Offline

#13 2011-09-16 12:43:10

Barafu Albino Cheetah
Member
From: Moscow
Registered: 2011-09-16
Posts: 34

Re: [SOLVED] pacman error: cannot open package file

Oh, I assumed you installed it and didn't upgrade. However, the point of my post is right: in binary distro you must have all packages of about the same age.

Offline

#14 2011-09-16 13:27:42

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] pacman error: cannot open package file

tomk

Well, maybe I didn't use the exact naming and definition for a rolling release, but I think everybogy understand what is meant by 2010.05 (the previous iso installer)

I'm sure you are right in your statements, but as I wrote above: there are 2 PCs with the same standard 2010.05 Arch Linux installed and the same nasm package on both; on one PC it can be installed without issues, on another it doesn't work

So the age of the package is not a problem in this exact scenario while both machines have exactly the same version of software. Even more, the packages from the 2010.05 installer CD are not working on the problematic PC.

Offline

#15 2011-09-16 14:03:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman error: cannot open package file

I get

error: './hunspell-pl-20110915-1-any.pkg.tar': cannot open package file

when there's no such file in the directory I'm in.
Please post the output of 'ls -l' followed by 'pacman -U nasm-2.09.10-1-i686.pkg.tar.xz'.

Offline

#16 2011-09-16 16:10:24

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] pacman error: cannot open package file

@karol

[root@zion downloaded]# ls -l
total 4432
-rw-r--r-- 1 root   root     55880 Dec 12  2010 ethtool-2.6.35-2-i686.pkg.tar.xz
-rw-r--r-- 1 root   root     26532 Dec 20  2010 iperf-2.0.5-1-i686.pkg.tar.xz
-rw-r----- 1 nobody nobody  386776 Sep 16 01:53 nasm-2.09.10-1-i686.pkg.tar.xz
-rw-r----- 1 nobody nobody 1902920 Sep 16 01:16 p7zip-9.20.1-4-i686.pkg.tar.xz
-rw-r----- 1 nobody nobody 1730192 Dec 30  2010 terminus-font-4.30-1-i686.pkg.tar.xz
-rw-r--r-- 1 root   root    424728 Sep 16 01:53 yasm-1.1.0-1-i686.pkg.tar.xz
[root@zion downloaded]# pacman -U nasm-2.09.10-1-i686.pkg.tar.xz
loading package data...
error: 'nasm-2.09.10-1-i686.pkg.tar.xz': cannot open package file
[root@zion downloaded]# pacman -U ./nasm-2.09.10-1-i686.pkg.tar.xz
loading package data...
error: './nasm-2.09.10-1-i686.pkg.tar.xz': cannot open package file

An probably an answer in advance: I have changed the owner to be root too with full permissions and nothing changed.

Last edited by art84 (2011-09-16 16:14:37)

Offline

#17 2011-09-16 16:13:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman error: cannot open package file

Why are those packages owned by 'nobody'? Can you install packages owned by root?

Offline

#18 2011-09-16 16:17:40

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] pacman error: cannot open package file

@karol

'nobody' because they were uploaded through NFS and there is "root_squash" used with the mapping to "nobody".
But as I guessed, you will ask about this and added a note above.

No, I cannot install any package, even those provided by the 2010.05 installation media.

[root@zion downloaded]# pacman -U ./ethtool-2.6.35-2-i686.pkg.tar.xz
loading package data...
error: './ethtool-2.6.35-2-i686.pkg.tar.xz': cannot open package file

Last edited by art84 (2011-09-16 16:19:12)

Offline

#19 2011-09-16 16:52:06

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] pacman error: cannot open package file

falconindy wrote:

And in this case, pacman is old enough that it doesn't support reading of xz compressed packages. `pacman -Syu' is the only supported upgrade path.

Quoting myself because you either didn't read it, or chose to ignore it. Should you have the 'unxz' utility available, feel free to uncompress one of these "unreadable" packages and then install it as a .pkg.tar.

No, I'm not suggesting that this is a proper solution, because it isn't. We will not support pacman 3.3. Please upgrade.

Offline

#20 2011-09-16 17:14:26

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] pacman error: cannot open package file

@falconindy

I have read your comment and I didn't ignore it. No offence, but it's wrong.
There is a possibility you missed some of my comments too.

Your statement  doesn't match the reality:

pacman is old enough that it doesn't support reading of xz compressed packages

I have exaclty the same Arch with exactly the same pacman and exactly the same ethtool-2.6.35-2-i686.pkg.tar.xz package on another PC and it works perfectly.
And as I specified, it doesn't work with any package, even those included on the 2010.05 which is the media used on both machines.

And I don't ask to support pacman 3.3, I only asked if anyone knows what could be wrong with it and maybe encountered a similar issue.

BTW, your suggestion to unpack the .xz module and install the .tar worked, Thanks for it.
At least now it's known for sure that there is something wrong related to the decompressing process.

Last edited by art84 (2011-09-16 17:20:22)

Offline

#21 2011-09-16 17:25:58

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] pacman error: cannot open package file

art84 wrote:

At least now it's known for sure that there is something wrong related to the decompressing process.

falconindy wrote:

pacman is old enough that it doesn't support reading of xz compressed packages

I'm done here.

Offline

#22 2011-09-16 17:36:35

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] pacman error: cannot open package file

@falconindy

Well, I solved the problem and I would like to announce you that

pacman is old enough that it doesn't support reading of xz compressed packages

is wrong.
It supports xz compressed packages perfectly.

As I supposed, something was broken (that PC was not running for more than 3 months, so I cannot say why it happened).
Your suggestion to uncompress a .xz package and install it uncompressed made me try the same thing with the xz package from the 2010.05 core.
After reinstalling the xz package everything works fine as before.

Offline

#23 2011-09-16 18:12:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman error: cannot open package file

OP uses pacman 3.3.3 and according to http://projects.archlinux.org/pacman.gi … ?id=v3.3.0 pacman 3.3.0 introduced xz archive format support for packages and databases.

Just for the record, by using *.pkg.tar package I didn't mean to imply that pacman 3.3.3 can't read xz https://bbs.archlinux.org/viewtopic.php … 86#p991486 I simply don't compress my packages.

Offline

Board footer

Powered by FluxBB