Author Topic: Canon Pixma MG2400series drivers in AUR - cannot install them  (Read 6461 times)

0 Members and 1 Guest are viewing this topic.

Offline cipricus

  • Jr. Mitglied
  • **
  • Posts: 58
  • Desktop: Fluxbox
  • Kernel: linux38-x64
  • Skill: Novice
I have found the drivers that I need for my printer on AUR.

I am sure about the name of these drivers because I have already installed them in Ubuntu from deb files which are provided on the Canon website. They are:

cnijfilter-common-4.00-1.x86_64 - https://aur.archlinux.org/packages/cnijfilter-common-mg2400
cnijfilter-mg2400series-4.00-1.x86_64 - https://aur.archlinux.org/packages/cnijfilter-mg2400series

I get this error when trying to install with pamac or yaourt:

Code: [Select]
error: failed to commit transaction (conflicting files)
cnijfilter-common-mg2400: /usr/lib64 exists in filesystem

What does that mean?

Also:

Code: [Select]
pacman -Qo /usr/lib64
/usr/lib64 is owned by filesystem 2015.09-1

/usr/lib64 is a link to /usr/lib, a 3.2 GB directory containing many program folders


One of the packages displayed by AUR when looking for the drivers can be installed:  cnijfilter-common  4.00-1

But then I need the specific driver for the printer, and that should still be cnijfilter-mg2400series. With   cnijfilter-common  already installed, more errors are displayed when trying to install cnijfilter-mg2400series:

Code: [Select]
error: failed to commit transaction (conflicting files)
cnijfilter-common-mg2400: /etc/udev/rules.d/81-canonij_prn.rules exists in filesystem
cnijfilter-common-mg2400: /usr/lib/cups/filter/pstocanonij exists in filesystem
cnijfilter-common-mg2400: /usr/lib64 exists in filesystem
cnijfilter-common-mg2400: /usr/lib64/bjlib exists in filesystem
cnijfilter-common-mg2400: /usr/lib64/bjlib/cnnet.ini exists in filesystem
cnijfilter-common-mg2400: /usr/lib64/cups/filter/pstocanonij exists in filesystem

It seems that cnijfilter-common-mg2400 is in fact needed instead of cnijfilter-common.

What should I do?
« Last Edit: 21. October 2015, 11:57:44 by cipricus »

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
Re: Found my Canon Pixma drivers in AUR but cannot install them
« Reply #1 on: 19. October 2015, 13:45:05 »
Code: [Select]
error: failed to commit transaction (conflicting files)
...
cnijfilter-common-mg2400: /usr/lib64/bjlib/cnnet.ini exists in filesystem
...

This is telling you that the package cnijfilter-common-mg2400 that you have just built (and are now trying to install) wants to install the file /usr/lib64/bjlib/cnnet.ini but that file already exists.

The file would already exist for 2 possible reasons:
  • Some other package you installed also provides this file, and thus cannot be installed at the same time as cnijfilter-common-mg2400; or
  • You were trying to install the driver manually and you or some install script already placed that file there (as opposed to a pacman package placing the file)

If you didn't place this file manually yourself (or ran some 3rd party install script or something), you can find what package (if any) owns a file like this:
Code: [Select]
pacman -Qo /path/to/file

Offline cipricus

  • Jr. Mitglied
  • **
  • Posts: 58
  • Desktop: Fluxbox
  • Kernel: linux38-x64
  • Skill: Novice
Re: Found my Canon Pixma drivers in AUR but cannot install them
« Reply #2 on: 19. October 2015, 14:18:06 »
This is telling you that the package cnijfilter-common-mg2400 that you have just built (and are now trying to install) wants to install the file /usr/lib64/bjlib/cnnet.ini but that file already exists.

The file would already exist for 2 possible reasons:
  • Some other package you installed also provides this file, and thus cannot be installed at the same time as cnijfilter-common-mg2400; or
  • You were trying to install the driver manually and you or some install script already placed that file there (as opposed to a pacman package placing the file)

If you didn't place this file manually yourself (or ran some 3rd party install script or something), you can find what package (if any) owns a file like this:
Code: [Select]
pacman -Qo /path/to/file



The error that you mention is not the one at stake.  It is just one of those which appear because I had installed  cnijfilter-common  4.00-1 - just to test, just because that was the only one installable. But that was not needed in fact.  (Maybe I  shouldn't have even mentioned those and bloat the post).

I had uninstalled  cnijfilter-common  4.00-1, no problems with that. Those errors disappear of course in this way.

Except for one: the initial error, as you can see in my post, when I try to install cnijfilter-common-mg2400, which  is the one really needed.

On that I already mentioned that the error was

Code: [Select]
error: failed to commit transaction (conflicting files)
cnijfilter-common-mg2400: /usr/lib64 exists in filesystem

And that I did

Code: [Select]
pacman -Qo /usr/lib64
/usr/lib64 is owned by filesystem 2015.09-1

/usr/lib64 is a link to /usr/lib, a 3.2 GB directory containing many program folders/

(I am using the Manjaro pamac helper to install the drivers found in AUR. I have identified them by name - as I already have them as deb, source and rpm from official Cannon site.)
« Last Edit: 19. October 2015, 14:28:12 by cipricus »

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
Re: Found my Canon Pixma drivers in AUR but cannot install them
« Reply #3 on: 19. October 2015, 14:33:42 »
Except for one: the initial error, as you can see in my post, when I try to install cnijfilter-common-mg2400, which  is the one really needed.

On that I already mentioned that the error was

Code: [Select]
error: failed to commit transaction (conflicting files)
cnijfilter-common-mg2400: /usr/lib64 exists in filesystem

And that I did

Code: [Select]
pacman -Qo /usr/lib64
/usr/lib64 is owned by filesystem 2015.09-1

/usr/lib64 is a link to /usr/lib, a 3.2 GB directory containing many program folders/

(I am using the Manjaro pamac helper to install the drivers found in AUR. I have identified them by name - as I already have them as deb, source and rpm from official Cannon site.)

Well then the AUR package maintainer needs to fix the cnijfilter-common-mg2400 package.

Turns our the maintainer is our own oberon :)

@oberon:
need to just restructure the package contents a bit with some mv commands at the end of the package function in PKGBUILD, rename /usr/lib64 to /usr/lib and whatever else is needed to un-redhat it and arch-ify.
« Last Edit: 19. October 2015, 14:58:18 by Rob »

Offline cipricus

  • Jr. Mitglied
  • **
  • Posts: 58
  • Desktop: Fluxbox
  • Kernel: linux38-x64
  • Skill: Novice
Re: Found my Canon Pixma drivers in AUR but cannot install them
« Reply #4 on: 19. October 2015, 14:36:54 »
Well then the AUR package maintainer needs to fix the cnijfilter-common-mg2400 package.

Turns our the maintainer is our own oberon :)

@oberon:
need to just restructure the package contents a bit at the end of the package function in PKGBUILD, rename /usr/lib64 to /usr/lib and whatever else is needed to un-redhat it and arch-ify.

I guess I'm lucky that the maintainer is Oberon !!

Offline eskaini

  • Security Team
  • *****
  • Posts: 10842
  • I eat deleted accounts
  • Skill: Novice
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #5 on: 19. October 2015, 14:41:32 »
When you have issues like this it is easy enough to open pamac-manager and search for cnijfilter and see what comes up, a list of what corresponds both installed as well as not. 
« Last Edit: 19. October 2015, 16:15:49 by Lizbeth1 »

Offline cipricus

  • Jr. Mitglied
  • **
  • Posts: 58
  • Desktop: Fluxbox
  • Kernel: linux38-x64
  • Skill: Novice
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #6 on: 19. October 2015, 14:53:04 »
When you have issues like this it is easy enough to open panacea manager and search for cnijfilter and see what comes up, a list of what corresponds both installed as well as not.

Yes, I did that. As I knew the name of the needed drivers having already used the official debs in Ubuntu I was able to identify them. They would not install because of what Rob said above.

I had the fancy of installing in order just to give it a try and test a package that was the only one installable: a common package (cnijfilter-common  4.00-1) - only to get more errors.

 I removed that, because in fact it was not needed: clearly, when trying to install the cnijfilter-mg2400series driver, it would try to install first cnijfilter-common-4.00-1.x86_64, which would conflict with cnijfilter-common  4.00-1.

So, forget about cnijfilter-common  4.00-1.

The problem is with a very specific driver:  cnijfilter-common-4.00-1.x86_64.

Offline oberon

  • Core Team
  • *****
  • Posts: 3858
  • I'm nice. Be new!
  • Branch: unstable
  • Desktop: i3, Deepin, Cinnamon
  • GPU Card: Intel ValleyView Gen7
  • GPU driver: Intel
  • Kernel: 4.1 / 4.4
  • Skill: Intermediate
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #7 on: 19. October 2015, 15:41:35 »
will fix that later tonight ... I'm out right now :)
manjaro is addictive ::)
* manjaro-i3  * manjaro-cinnamon  * manjaro-deepin

Offline oberon

  • Core Team
  • *****
  • Posts: 3858
  • I'm nice. Be new!
  • Branch: unstable
  • Desktop: i3, Deepin, Cinnamon
  • GPU Card: Intel ValleyView Gen7
  • GPU driver: Intel
  • Kernel: 4.1 / 4.4
  • Skill: Intermediate
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #8 on: 19. October 2015, 16:00:33 »
Well I'm afraid I don't understand completely yet the problem here. On my system I can install the package without problem like it is. I only have to remove my other Canon driver first to get rid of conflicting files. I don't get any /usr/lib64 conflicts ... ???
manjaro is addictive ::)
* manjaro-i3  * manjaro-cinnamon  * manjaro-deepin

Offline eskaini

  • Security Team
  • *****
  • Posts: 10842
  • I eat deleted accounts
  • Skill: Novice
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #9 on: 19. October 2015, 16:17:19 »
try to install anything else and see if you get any errors also.  if so clean out your cache


if you have no other means for cleaning out the cache, open a file manager as root and navigate to

/var/cache/

and erase everything in that directory
« Last Edit: 19. October 2015, 16:18:58 by Lizbeth1 »

Offline eskaini

  • Security Team
  • *****
  • Posts: 10842
  • I eat deleted accounts
  • Skill: Novice
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #10 on: 19. October 2015, 16:22:45 »
of course you can also check the size of your root directory to see if its run out of space too since the cache directory is by default in the root directory.

also you can edit sudo mousepad (or whatever you have) /etc/pacman.conf

and change the cache entry to a partition that has a lot more space also (my solution)

youll also need to uncomment the line by deleting the # at the beginning of the line as well

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #11 on: 19. October 2015, 16:25:03 »
Well I'm afraid I don't understand completely yet the problem here. On my system I can install the package without problem like it is. I only have to remove my other Canon driver first to get rid of conflicting files. I don't get any /usr/lib64 conflicts ... ???

I've seen this sort of thing a number of times over the year with packages trying to place files via the lib64 symlink. I don't know exactly why some people seem to get affected by it but others not, but either way, it's best practice to Arch-ify the structure of the files from .rpm/.deb's when packaging their content for Arch.

Quoting Allan McRae:
http://allanmcrae.com/2014/12/pacman-4-2-released/
Quote
Directory Symlink Handling: Example time! Arch Linux has a /lib -> /usr/lib symlink. Previously, if pacman was installing a package and it found files in /lib, it would follow the symlink and install it in /usr/lib. However the filelist for that package still recorded the file in /lib. This caused heaps of difficulty in conflict resolving – primarily the need to resolve every path of all package files to look for conflicts. That was a stupid idea! So now if pacman sees a /lib directory in a package, it will detect a conflict with the symlink on the filesystem.

So, /usr/bin and /usr/lib (and /usr/lib32 on multilib system) are real in Arch and are where files should be installed, stuff like /lib, /bin, /sbin, /lib64, /usr/lib64, /usr/sbin, etc. are all symlinks and Arch packages shouldn't be trying to use them as a path for placing files.

From a quick look at your package you want
Code: [Select]
rm -r $pkgdir/usr/lib
mv $pkgdir/usr/lib64 $pkgdir/usr/lib
cp -r $pkgdir/usr/local/* $pkgdir/usr/
rm -r $pkgdir/usr/local
at the end of your package function.

This gets rid of using anything lib64 and stops anything going in /usr/local because that's not where stuff should be placed by packages in Arch either.
« Last Edit: 19. October 2015, 16:32:02 by Rob »

Offline oberon

  • Core Team
  • *****
  • Posts: 3858
  • I'm nice. Be new!
  • Branch: unstable
  • Desktop: i3, Deepin, Cinnamon
  • GPU Card: Intel ValleyView Gen7
  • GPU driver: Intel
  • Kernel: 4.1 / 4.4
  • Skill: Intermediate
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #12 on: 19. October 2015, 16:48:04 »
I see. Beginning to understand ;)
Does that mean those symlinks are actually created by pacman during installation?
Will need more time to digest how this actually works, later ;) ;D
For now I have just updated the PKGBUILD like that and hope it works... 8)
manjaro is addictive ::)
* manjaro-i3  * manjaro-cinnamon  * manjaro-deepin

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #13 on: 19. October 2015, 16:57:38 »
From what AM said, Pacman knows/detects that they're symlinks and has been made to intentionally give an error.

Consider this scenario:

PackageA contains the file /lib/foo
If you install PackageA and do pacman -Ql PackageA one of the files listed will be /lib/foo
PackageB contains the file /usr/lib/foo
You try to install PackageB while you have PackageA installed and pacman tells you that there's conflicting files: /usr/lib/foo already exists.
So you do pacman -Qo /usr/lib/foo to find out what package owns it, but pacman tells you no package owns it, because PackageA put an entry in pacman's database for /lib/foo, not /usr/lib/foo.

Offline cipricus

  • Jr. Mitglied
  • **
  • Posts: 58
  • Desktop: Fluxbox
  • Kernel: linux38-x64
  • Skill: Novice
Re: Canon Pixma MG2400 drivers in AUR but cannot install them
« Reply #14 on: 19. October 2015, 17:24:26 »
I see. Beginning to understand ;)
Does that mean those symlinks are actually created by pacman during installation?
Will need more time to digest how this actually works, later ;) ;D
For now I have just updated the PKGBUILD like that and hope it works... 8)

The driver has two parts.
Now this (https://aur.archlinux.org/packages/cnijfilter-common-mg2400 - 2015-10-19 14:46) works, that is the "common" package, but not yet the other part of 2400 driver (https://aur.archlinux.org/packages/cnijfilter-mg2400series - Last Updated:    2015-09-21 22:34), which still gives that error and  needs update too.
« Last Edit: 19. October 2015, 17:42:55 by cipricus »