Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 06-04-2014, 03:33 PM   #1
lenikadali
Junior Member
lenikadali began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: acer 3744
Cannot run Calibre

Hello.

I have managed to successfully install Calibre on my 32-bit Kali Linux using the commands as provided on the Calibre site:

sudo -v && wget -nv -O-https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"

When I try to run the commands 'calibre' and 'calibre-debug', I get the output:

bash: calibre: command not found

It gives me the same thing when I try to run 'calibre-debug'. When I navigate to the /opt/calibre directory where the program was installed, the commands still do not work. It is only when I run them as './calibre' and './calibre-debug' that I get any response.

When I run './calibre' from within the /opt/calibre directory, I get the following output:
Traceback (most recent call last):
File "site.py", line 53, in main
File "site.py", line 14, in set_default_encoding
File "locale.py", line 511, in getdefaultlocale
File "locale.py", line 443, in _parse_localename
ValueError: unknown locale: en_ZM

And when I run './calibre-debug', I get the following output:
Traceback (most recent call last):
File "site.py", line 53, in main
File "site.py", line 14, in set_default_encoding
File "locale.py", line 511, in getdefaultlocale
File "locale.py", line 443, in _parse_localename
ValueError: unknown locale: en_ZM

If anyone can help point me in the right direction so that I get my Calibre working, I would be very grateful. I have Googled ad-infinitum, and none of the solutions seem to be clear enough to follow.

I'm an intermediate user of Linux and I am willing to edit whatever files, configure, compile etc. so that the program runs successfully as well as provide relevant information to aid in the troubleshooting.

Thanks in advance.
lenikadali is offline   Reply With Quote
Old 06-04-2014, 03:42 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
ValueError: unknown locale: en_ZM
It seems to be tripping on you Locale.

Kovid is on Holiday, but some other developer may have an answer
theducks is offline   Reply With Quote
Advert
Old 06-04-2014, 04:14 PM   #3
lenikadali
Junior Member
lenikadali began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: acer 3744
@theducks,

Quote:
ValueError: unknown locale: en_ZM
if that is the problem, what file do I have to edit in order to sort it out??
lenikadali is offline   Reply With Quote
Old 06-04-2014, 04:17 PM   #4
lenikadali
Junior Member
lenikadali began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: acer 3744
If that is the problem, is there a file that I can edit to change the locale? If so, how would I go about it? Will it require dealing with the python code or is it more a config issue?
lenikadali is offline   Reply With Quote
Old 06-04-2014, 04:36 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,718
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@lenikadali - I'll hazard a guess - in Linux you have the locale set to en_ZM (that's Zambia I think), and for some reason calibre doesn't recognize that locale. Try changing your Linux locale en_US (United States of America).

If the above works then the question is - why not en_ZM?

If that doesn't work then I'm wrong.

BR

Last edited by BetterRed; 06-04-2014 at 04:51 PM.
BetterRed is offline   Reply With Quote
Advert
Old 06-04-2014, 05:05 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by lenikadali View Post
@theducks,



if that is the problem, what file do I have to edit in order to sort it out??
Locale is a system setting. en_US and en_GB and a few other have not raised flags.
theducks is offline   Reply With Quote
Old 06-04-2014, 06:31 PM   #7
lenikadali
Junior Member
lenikadali began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: acer 3744
[
Quote:
'll hazard a guess - in Linux you have the locale set to en_ZM (that's Zambia I think), and for some reason calibre doesn't recognize that locale. Try changing your Linux locale en_US (United States of America).
]

@BetterRed, I have tried changing it using the System Settings GUI, have edited the /etc/default/locale file. Calibre still gives me the ValueError. Any other files I am supposed to be looking at?

Thanks for your help and your time.

the same to @theducks.
lenikadali is offline   Reply With Quote
Old 06-04-2014, 06:44 PM   #8
lenikadali
Junior Member
lenikadali began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: acer 3744
Have edited the /etc/locale.gen file as well and uncommented the lines 'en_US' (both ISO-8859 and the UTF-8). ValueError still appears.
lenikadali is offline   Reply With Quote
Old 06-04-2014, 09:42 PM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,718
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by lenikadali View Post
Any other files I am supposed to be looking at?
None that come to mind. What is Kali reporting when you do a $ locale command with no arguments

But, I read through your original post again, the locale 'thing' might be a false signal. The real issue is :
Quote:
Originally Posted by lenikadali View Post
I have managed to successfully install Calibre on my 32-bit Kali Linux using the commands as provided on the Calibre site:

sudo -v && wget -nv -O-https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"

When I try to run the commands 'calibre' and 'calibre-debug', I get the output:

bash: calibre: command not found
...
Why not one asks - is there anything unusual about Kali.

BR

Last edited by BetterRed; 06-04-2014 at 10:17 PM.
BetterRed is offline   Reply With Quote
Old 06-04-2014, 11:17 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,343
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to ensure that the LANG environment variable is set to a locale that is recognized by your system. That means locale.gen needs to have an entry for that locale and you need to regenerate the locales after editing locale.gen. The details on how to do all that are distro specific so you should ask in your distro forums.
kovidgoyal is online now   Reply With Quote
Old 06-05-2014, 05:04 PM   #11
lenikadali
Junior Member
lenikadali began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: acer 3744
@BetterRed, Calibre installs to the directory /opt/calibre. If I want to run the software, I need to navigate to the /opt/calibre category, then run it as I stated in the following lines:

Quote:
It is only when I run them as './calibre' and './calibre-debug' that I get any response.
I don't know why that is.

@Kovid, I am assuming you agree with BetterRed's assessment that it is a locale problem and nothing else.
lenikadali is offline   Reply With Quote
Old 06-05-2014, 05:50 PM   #12
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by lenikadali View Post
@BetterRed, Calibre installs to the directory /opt/calibre. If I want to run the software, I need to navigate to the /opt/calibre category, then run it as I stated in the following lines:



I don't know why that is.

@Kovid, I am assuming you agree with BetterRed's assessment that it is a locale problem and nothing else.
That is because calibre is not on your search path. If you add the /opt/calibre folder to your search path then you should be able to run Calibre from anywhere.
itimpi is offline   Reply With Quote
Old 06-06-2014, 10:01 AM   #13
lenikadali
Junior Member
lenikadali began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2014
Device: acer 3744
@itimpi, @theducks, @kovidgoyal and @BetterRed,

Thank you all for your time and help. The problem was indeed the locale. I used dpkg-reconfigure locales to set the locale to "en_US:UTF-8' and calibre was able to run successfully. I get this message when I run 'calibre' in the terminal:

Failed to check for calibre update: <urlopen error [Errno -2] Name or service not known>

But other than that, the problem is solved and Calibre works without a hitch.
lenikadali is offline   Reply With Quote
Reply

Tags
calibre, installation, linux


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'RUN, RUN, RUN' a crime thriller $1.61 tothepoint Self-Promotions by Authors and Publishers 10 09-01-2014 12:07 PM
Do I need to run Calibre content server to use Calibre Companion flyash Calibre 2 04-06-2013 10:19 PM
Can't get Calibre to run goldie Calibre 25 10-14-2010 03:39 AM


All times are GMT -4. The time now is 11:55 PM.


MobileRead.com is a privately owned, operated and funded community.