Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Printer prints gibberish whenever it is used
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bsquared938
n00b
n00b


Joined: 27 Jun 2013
Posts: 13

PostPosted: Thu Jun 27, 2013 9:46 pm    Post subject: Printer prints gibberish whenever it is used Reply with quote

Hey,

So I have been trying to install an HP LaserJet P2035 printer on my computer over the past few days.

I emerged CUPS and configured it - the printer is accepting jobs, all right...

The problem is that the printer, whenever it prints anything, just prints out one line (the same one line) over about 10 pages. The line takes up only the first line of everyone of the pages it prints on. Also, regardless of the document/file/picture being sent to the printer, it always prints this exact same line, on the same number of pages, every time.

I thought that the printer itself might be acting up, but whenever I attach the printer to some other (non-linux) computer, the printer prints fine...


I figured that this might be a driver issue, and upon consulting the HP support website for linux, I found that this printer model (above) needs the hplip package. I tried to emerge that package and I get this error:

Code:

emerge -av hplip

>>> Emerging (1 of 1) net-print/hplip-3.12.10a
 * hplip-3.12.10a.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                       [ ok ]
 * hplip-3.12.10-patches-1.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                              [ ok ]
 * ERROR: net-print/hplip-3.12.10a failed (setup phase):
 *   PYTHON(): Active version of CPython 2 not set
 *
 * Call stack:
 *               ebuild.sh, line   93:  Called pkg_setup
 *   hplip-3.12.10a.ebuild, line   78:  Called python_set_active_version '2'
 *           python.eclass, line 1750:  Called PYTHON '-2'
 *           python.eclass, line 1908:  Called die
 * The specific snippet of code:
 *               die "${FUNCNAME}(): Active version of CPython 2 not set"
 *
 * If you need support, post the output of `emerge --info '=net-print/hplip-3.12.10a'`,
 * the complete build log and the output of `emerge -pqv '=net-print/hplip-3.12.10a'`.
 * The complete build log is located at '/var/tmp/portage/net-print/hplip-3.12.10a/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-print/hplip-3.12.10a/temp/die.env'.
 * Working directory: '/usr/lib64/portage/pym'
 * S: '/var/tmp/portage/net-print/hplip-3.12.10a/work/hplip-3.12.10a'

>>> Failed to emerge net-print/hplip-3.12.10a, Log file:

>>>  '/var/tmp/portage/net-print/hplip-3.12.10a/temp/build.log'

 * Messages for package net-print/hplip-3.12.10a:

 * ERROR: net-print/hplip-3.12.10a failed (setup phase):
 *   PYTHON(): Active version of CPython 2 not set
 *
 * Call stack:
 *               ebuild.sh, line   93:  Called pkg_setup
 *   hplip-3.12.10a.ebuild, line   78:  Called python_set_active_version '2'
 *           python.eclass, line 1750:  Called PYTHON '-2'
 *           python.eclass, line 1908:  Called die
 * The specific snippet of code:
 *               die "${FUNCNAME}(): Active version of CPython 2 not set"
 *
 * If you need support, post the output of `emerge --info '=net-print/hplip-3.12.10a'`,
 * the complete build log and the output of `emerge -pqv '=net-print/hplip-3.12.10a'`.
 * The complete build log is located at '/var/tmp/portage/net-print/hplip-3.12.10a/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-print/hplip-3.12.10a/temp/die.env'.
 * Working directory: '/usr/lib64/portage/pym'
 * S: '/var/tmp/portage/net-print/hplip-3.12.10a/work/hplip-3.12.10a'




So I'm not to sure what to do at this point. I am not sure if it is a driver issue, or if it is a CUPS issue....


Any ideas?
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1389

PostPosted: Thu Jun 27, 2013 9:54 pm    Post subject: Reply with quote

Welcome to the forums.

You will need hplip for the driver. It also includes a tool to configure and monitor your printer. You can try emerging it with the minimal flag to only get the drivers, but it looks like your problem is with python.

What does eselect python list show? If you only have python 3 installed, try emerge -av1 dev-lang/python:2.7

By the way, I experienced exactly the same issue with my HP printer. The problem is the driver.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
bsquared938
n00b
n00b


Joined: 27 Jun 2013
Posts: 13

PostPosted: Thu Jun 27, 2013 10:13 pm    Post subject: Reply with quote

Hi,

Thanks for the warm welcome :).

Had a feeling that the driver was the issue...



Upon running eselect python list I get:
Code:

eselect python list

Available Python interpreters:
  [1]   python2.7
  [2]   python3.2 *



And upon running emerge -av dev-lang/python:2.7:
Code:

emerge -av dev-lang/python:2.7
 
* IMPORTANT: 2 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-lang/python-2.7.3-r3:2.7  USE="gdbm hardened ipv6 ncurses readline ssl threads (wide-unicode) xml -berkdb -build -doc -examples -sqlite -tk -wininst" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]



I didn't emerge the python 2.7 package...should I follow through with this?

I had run the emerge -av python command a few times after I got this hplip emerge error....
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1389

PostPosted: Thu Jun 27, 2013 10:18 pm    Post subject: Reply with quote

Try setting your active version to python 2 via eselect. It is probably looking at the active version of python and having a fit because it isn't python 2. Reinstalling python shouldn't have any affect so I don't think it will help.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
bsquared938
n00b
n00b


Joined: 27 Jun 2013
Posts: 13

PostPosted: Thu Jun 27, 2013 10:36 pm    Post subject: Reply with quote

Thank you so much for your advice! :)



Okay so I changed the python version using eselect python set 1...

But now I can't run the emerge -av hplip command at all...kept it there for 5 minutes and it doesn't do anything. Upon changing the python version back to 3.*, it seems to work okay again...

The console just doesn't do anything unless I hit Ctrl+C to cancel the command...

I was seeing somewhere that there might be something going on where hplip looks at Python 3, and there is a way to point it to the Python 2.....could this be a possibility?


Thanks...
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4610
Location: Saint Amant, Acadiana

PostPosted: Thu Jun 27, 2013 10:38 pm    Post subject: Reply with quote

Running python-updater is in order.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
bsquared938
n00b
n00b


Joined: 27 Jun 2013
Posts: 13

PostPosted: Fri Jun 28, 2013 4:43 pm    Post subject: Reply with quote

Hmm...

Ran the python-updater command and it got stuck on the 2nd package out of 5 when it was emerging (using the python-updater command).

I have set the python version to 2.7 (see above posts...), not sure why it froze while emerging...
Back to top
View user's profile Send private message
jburns
l33t
l33t


Joined: 18 Jan 2007
Posts: 804
Location: Massachusetts USA

PostPosted: Fri Jun 28, 2013 5:58 pm    Post subject: Reply with quote

Set python 3 as the active python version, then run python-updater, and then emerge hplip.
Back to top
View user's profile Send private message
bsquared938
n00b
n00b


Joined: 27 Jun 2013
Posts: 13

PostPosted: Thu Jul 04, 2013 12:12 am    Post subject: Reply with quote

Okay so this is the order that I entered commands in order to get hplips up and running again (I believe....it took a while to figure this out...). I would also like to give credit to someone here in my office who helped me out with this issue as well:

1) First I set python version to 2.7 using eselect python list

2) Re-emerge python versions 2.7 and 3.2, independently

3) Ran python-updater to make sure it worked out (it didn't freeze after the above steps were carried out...)

4) Emerge hplips


Then I was able to install the printer driver and print meaningful stuff :).

Thanks to everyone who helped on the forums!! :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum