I'm trying to use my hp laserjet p1006 printer with my raspberry pi (archlinux, Linus 3.18.9).
I already set up the cups server, I can manage my printer through the web interface, and added my user to sys and lp groups.
I can "install" my printer through this interface, choose a "model" (driver?) amongst hpcups and hpijs (none works).
I can manage my printer, but when I try to print something with it, it ends with a "filter failed" error in my cups interface and my printer doesn't react.
I didn't find a PPD file (on openprinting.org, they say : "PPD files (and the Foomatic XML files to generate them) come with the driver (foo2xqx), therefore we do not supply PPDs here on the OpenPrinting site.").
I tried to install foo2xqx by installing foo2zjs (in which it's included) with yaourt.
I also edited each PKGBUILD to replace the architecture ('i686' or 'x86_64') with 'armv6h'.
But It fails to build and install a dependency : foomatic-db-foo2zjs.
Here is the output of yaourt :
==> ERROR: Failure while creating working copy of foomatic-db-foo2zjs bzr repo
Aborting...
==> ERROR: Makepkg was unable to build foomatic-db-foo2zjs.
I also tried to add more swap but it solved nothing.
What could I do?
Thank you for your help!
EDIT : I tried to add space to /tmp (as this tutorial explains : http://www.boxtutorials.com/how-to-increase-the-size-of-disk-space-tmp-usrtmpdsk-partition-in-linux-server.html) and it went further.
But I still have an issue :
If I try to build the package with yaourt :
I got an error with the PKGBUILD file :
pkgname=foomatic-db-foo2zjs
arch=('i686' 'x86_64' 'armv6h')
_snapdate=20141011
pkgver=${_snapdate}
pkgrel=1
epoch=3
license=('GPL' 'custom')
pkgdesc="Foomatic - The collected knowledge about printers, drivers, and driver options in XML files, used by foomat\
ic-db-engine to generate PPD files. Rebuilt for use with foo2zjs."
depends=('perl' 'libxml2')
conflicts=('foomatic-db-ppd' 'foomatic-db-hpijs' 'foomatic-db' 'foo2zjs-testing')
provides=('foomatic-db-hpijs' 'foomatic-db')
makedepends=('cups' 'perl' 'libxml2' 'enscript' 'perl' 'net-snmp' 'bash' 'bzr')
source=(foomatic-db-foo2zjs::bzr+http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db/)
url="http://www.linuxprinting.org/foomatic.html"
md5sums=('SKIP')
package() {
cd ${srcdir}/${pkgname}
bzr revno
echo $pkgver
# here are the problems :
# I tried chmod calls both with and without "sudo"
# chmod 777 ./make_configure
./make_configure
# chmod 777 ./configure
./configure --prefix=/usr
make DESTDIR=${pkgdir} install
install -v -Dm644 ${srcdir}/${pkgname}/COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
# foo2zjs provides different versions of the following files
rm ${pkgdir}/usr/share/foomatic/db/source/driver/foo2hiperc.xml
# some other rm calls
rm ${pkgdir}/usr/share/foomatic/db/source/printer/HP-LaserJet_1005.xml
}
I got the following :
PKGBUILD: line 24: ./make_configure: Permission denied
==> ERROR: A failure occurred in package().
Aborting...
==> ERROR: Makepkg was unable to build foomatic-db-foo2zjs.
I tried to add a call to "sudo chmod" in this file to get permissions but it doesn't work.
And if I try to build myself the package (with makepkg) :
it returns :
-> Creating working copy of foomatic-db-foo2zjs bzr repo...
bzr: ERROR: Not a branch: "/home/vmonteco/build/foomatic-db-foo2zjs/foomatic-db-foo2zjs/.bzr/branch/": location is a repository.
==> ERROR: Failure while creating working copy of foomatic-db-foo2zjs bzr repo
Aborting...
Any idea?
By the way, I also found a tutorial (in French, sorry) that is exactly what I was searching for (same case, same devices, same package...), I put it here in case it could help somebody else, even a non-french speaker with just the commands.
http://www.azurs.net/carnet/2013/09/raspberry-pi-serveur-impression-imprimante-hp-laserjet-p1006/
I'm stuck (see the two errors above) at the two last steps "L’AUR sans peine, mais avec yaourt" ("AUR without troubles, but with yaourt") and "Empaquetage avec makepkg" ("packaging with makepkg"). I tried both but both failed when I tried.
I finally managed to fix it.
I'll recapitulate :
I added swap and made a larger /tmp to get rid off space issues. (The first problem I was encountering)..
But I also had to mount the /tmp without "noexec" option, to permit yaourt to run the PKGBUILD file (as suggested here : https://bbs.archlinux.org/viewtopic.php?id=189625).
I still have an issue (filter failed) with installing my printer with cups with the new drivers, so I'll wait to have a solution for this too before I mark this post as "solved". :)
EDIT:
I finally reinstalled my printer with the hp-setup tool (hp-lip package) and it worked. :)
I hope it could help anybody else!
Related
I am including opencv with custom build parameters in my Yocto image. For that I have an opencv_4.1.0.bbappend recipe, in which I set custom options, specifically FFMPEG. The recipe goes something like this:
DEPENDS += "ffmpeg libpng"
EXTRA_OECMAKE_append += "-DWITH_FFMPEG=ON -DWITH_GTK=OFF" # and some other options
During configure I get cmake errors and can't seem to figure out, how to satisfy the header dependencies. The errors go like this (I assume this is the reason for do_configure to fail):
CheckIncludeFile.c:1:10: fatal error: /home/janos/dev/yocto/build/tmp/work/core2-64-poky-linux/opencv/4.1.0-r0/recipe-sysroot/usr/include/libpng/png.h: No such file or directory
1 | #include </home/janos/dev/yocto/build/tmp/work/core2-64-poky-linux/opencv/4.1.0-r0/recipe-sysroot/usr/include/libpng/png.h>
CheckIncludeFile.c:1:10: fatal error: sys/videoio.h: No such file or directory
1 | #include <sys/videoio.h>
Focusing on the missing png.h header first, I am tempted to depend libpng-dev, as I also would apt install it. But there is no package for it.
When I search oe-pkgdata-util list-pkg-files -p libpng, I can find the header in a libpng-dev package:
...
libpng-dev:
/usr/bin/libpng-config
/usr/bin/libpng16-config
/usr/include/libpng16/png.h
/usr/include/libpng16/pngconf.h
/usr/include/libpng16/pnglibconf.h
/usr/include/png.h
...
...
I can also find it in libpng-src and also ffmpeg-src package (oe-pkgdata-util find-path "*png.h" was my friend). But all of these -dev and -src packages I cannot depend on in DEPENDS.
How can I get my recipe to know those headers?
Target machine is raspberrypi4-64, on which the recipe is configuring and compiling well - it fails when I build for qemux86-64, which I use for testing. Namely, my test command is MACHINE="qemux86-64" bitbake opencv.
It doesn't really answer the question which I though was the question - but this is how the opencv recipe is easily configured:
PACKAGECONFIG = "python3 libav libv4l v4l"
Looking into the opencv 4.1.0 recipe (opencv_4.1.0.bb), I could see that FFMPEG gets enabled with the libav configurable option.
As a result of depending FFMEPG, I had to whitelist "commercial" licenses in my local.conf file:
LICENSE_FLAGS_WHITELIST = "commercial"
Looking into ./build/tmp/work/aarch64-poky-linux/opencv/4.1.0-r0/temp/log.do_configure shows that opencv is correctly configured without GUI, with v4l/v4l2:, FFMPEG, python3, etc.
And so python3 in the resulting image:
import cv2
print(cv2.getBuildInformation())
I was following this guide: https://github.com/omichel/naoqisim/blob/master/README.md
I installed msys64 and Vistual Studio. In msys I proceeded with the pacman commands as stated in the installation guide, which in turn donwloaded a bunch of stuff.
Now the next step in the Github guide proceeds with the Build.
I executed the commands:
$ WEBOTS_HOME='/c/Program Files/Webots'
$ cd /c/Users/Pawel/Desktop/NAOqi/naoqisim-master
$ make
After it finished downloading I got this:
simulator-sdk-2.1.4 100%[===================>] 379.16M 346KB/s in 31m 31s
2019-02-07 23:11:10 (205 KB/s) - ‘simulator-sdk-2.1.4.1-win32-vs2010.zip’ saved [397574953/397574953]
# extracting simulator-sdk-2.1.4.1-win32-vs2010.zip
make[1]: unzip: Command not found
make[1]: *** [Makefile:63: simulator-sdk] Error 127
make: *** [Makefile:7: default] Error 2
It looks like you need to install unzip.
I don't know if this is resolved. But for whoever else may have the same problem. I have had similar problem installing naoqi and stuff. This Github was actually quite helpful (and now it finally works on webots, i mean naoqi is found at least).
https://github.com/sunzhida/COMP4461_2017Fall_Lab4
I am the developer of this small library: https://github.com/martin-damien/babel and I have a problem with Luarocks releases.
From source
When I install from source with Luarocks I have no problem:
$ luarocks make --local rockspecs/babel-1.2-2.rockspec
From internet
But when deployed (using: tag master, add new rockspec release and publish to Luarocks), I can't install using
$ luarocks install --local babel
Because I encounter the following error:
Installing https://luarocks.org/babel-1.2-2.src.rock...
Using https://luarocks.org/babel-1.2-2.src.rock... switching to 'build' > mode
stat: malsukcesis eltrovi statinformon pri «locales/zh-HK.lua»: No such > file or directory
Error: Build error: Failed installing locales/zh-HK.lua in /home/damien/.luarocks/lib/luarocks/rocks/babel/1.2-2/lua/locales/zh-HK.lua: locales/zh-HK.lua: No such file or directory
As you can see in https://github.com/martin-damien/babel/issues/14 the error occure on different files (but until now, only with locale files, not with the babel.lua file).
I have no idea why it randomly crash like this, so if someone know why or have an idea from where it could come from...
Thanks in advance,
Damien
The location of the files in the build.modules table is (from the docs on the rockspec format):
relative to source.dir
Where source.dir is
source.dir (string) - the name of the directory created when the source archive is unpacked. Can be omitted if it can be inferred from the source.file field. Example: "luasocket-2.0.1"
and source.file is
source.file (string) - the filename of the source archive. Can be omitted if it can be inferred from the source.url field. Example: "luasocket-2.0.1.tar.gz"
You don't specify source.dir or source.file in your rockspec but you do set source.url (because you have to).
So you have source.url = https://github.com/martin-damien/babel/archive/v1.2-2.zip which (presumably) ends up with source.file = v1.2-2.zip and then source.dir = v1.2-2 but your zip file extracts into a babel-1.2 so luarocks can't find your source files. (The screenshot in the linked issue seems to indicate that luarocks uses source.file = v1.2.zip and the archive extracts to babel-1.2 but I'm not sure how that's possible.)
Add dir = "babel-1.2" to your rockspec's source table an I expect it will work.
I'm attempting to create a Homebrew formula for gtk-mac-integration. Running make in bindings/python/gtkosx_application fails:
/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/usr/local/Cellar/gtk-mac-integration/2.0.7/share/pygobject/2.0/codegen/h2def.py': [Errno 2] No such file or directory
make[3]: *** [gtkosx_application.defs] Error 2
This is because the Makefile tries to find the h2def.py file in the wrong location:
gtkosx_application.defs: $(headers)
$(PYTHON) $(datadir)/pygobject/2.0/codegen/h2def.py $(headers) > $#
It is clear to me why this is failing: $(datadir) points to the share directory of the package that is to be installed (gkt-mac-integration). Because Homebrew installs all packages into their own prefix (/usr/local/Cellar/...), it is not the same for gtk-mac-integration and pygobject.
I know it is possible to find out where the pygobject data directory is located using
pkg-config --variable=datadir pygobject-2.0
I don't suppose the correct fix is to replace datadir in the Makefile with the string above? How should I adjust configure.ac and Makefile.am to make this work properly?
Yeah, that sounds like a bug in the build system.
You can use the inreplace facility to patch this up. Insert this after def install:
inreplace %w[bindings/python/gtkmacintegration/Makefile.am
bindings/python/gtkmacintegration/Makefile.in
bindings/python/gtkosx_application/Makefile.am
bindings/python/gtkosx_application/Makefile.in],
'$(datadir)/pygobject', |
%x[pkg-config --variable=datadir pygobject-2.0].chomp + '/pygobject'
(I tried this out. The formula builds after that.)
You should report this upstream. They should change their build system to sort this out in their configure script.
I have tried to install OTP14B02 on OpenSolaris and i get the following error at calling ./configure:
muzaaya#opensolaris:~/Desktop/software and data/otp_src_R14B02# ./configure
Ignoring the --cache-file argument since it can cause the system to be erroneously configured
Disabling caching
Usage: cd [-LP] [directory]
Or: cd [ options ] old new
configure: error: cannot find install-sh or install.sh in export/home/muzaaya/Desktop/software and data/otp_src_R14B02/erts/autoconf /export/home/muzaaya/Desktop/software and data/otp_src_R14B02//export/home/muzaaya/Desktop/software and data/otp_src_R14B02/erts/autoconf
What could be causing this problem and how can i overcome it?
Whenever I see a space in a path on any system all kinds of bells an whistles goes off, it shouldn't matter but sometime it does. Have you tried moving to a path without spaces in it?
Also, as it says, it failed to find /export/home/muzaaya/Desktop/software and data/otp_src_R14B02/erts/autoconf/install.sh, does that file exist on your system?