Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
6000 Lượt xem

Hello All, 

Here is my error when I try to start the openerp-server using " ./openerp-server " command on my Ubuntu 14.04 server, so could u please anyone help me? 

Thank You.

Traceback (most recent call last):
  File "./openerp-server", line 5, in <module>
    openerp.cli.main()
  File "/home/zone/openerp-8.0-29e08a2/openerp/cli/__init__.py", line 71, in main
    o.run(args)
  File "/home/zone/openerp-8.0-29e08a2/openerp/cli/server.py", line 174, in run
    main(args)
  File "/home/zone/openerp-8.0-29e08a2/openerp/cli/server.py", line 139, in main
    openerp.tools.config.parse_config(args)
  File "/home/zone/openerp-8.0-29e08a2/openerp/tools/config.py", line 336, in parse_config
    openerp.netsvc.init_logger()
  File "/home/zone/openerp-8.0-29e08a2/openerp/netsvc.py", line 136, in init_logger
    resetlocale()
  File "/home/zone/openerp-8.0-29e08a2/openerp/tools/translate.py", line 1084, in resetlocale
    for ln in get_locales():
  File "/home/zone/openerp-8.0-29e08a2/openerp/tools/translate.py", line 1052, in get_locales
    lang = locale.getdefaultlocale()[0]
  File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Madura, what is the output of locale command in your linux command line?

Ảnh đại diện
Huỷ bỏ
Tác giả

Hello John, here is my locale:________ locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=UTF-8 LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=

Here's mine (also Ubuntu 14.04): LANG=en_US.UTF-8 LANGUAGE=en_US LC_CTYPE="en_US.UTF-8" LC_NUMERIC=en_GB.UTF-8 LC_TIME=en_GB.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=en_GB.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=en_GB.UTF-8 LC_NAME=en_GB.UTF-8 LC_ADDRESS=en_GB.UTF-8 LC_TELEPHONE=en_GB.UTF-8 LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=en_GB.UTF-8 LC_ALL= As you can see from the error message and compared to what I have, the LC_CTYPE has an incorrect value. This webpage described how you should rectify it: http://askubuntu.com/questions/33025/locale-settings-are-not-right-how-can-i-reset-them

Another way is to follow the instruction in this webpage: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue (see answer from Otto Kekäläinen or Rinzwind)

Tác giả Câu trả lời hay nhất

I found a solution and it worked to me. The solution is given below.

sudo cp /etc/default/locale /etc/default/locale.BACKUP
sudo rm -rf /etc/default/locale

sudo su root -c "echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale"
sudo su root -c "echo 'LANG="en_US.UTF-8"' >> /etc/default/locale"
sudo su root -c "echo 'LANGUAGE="en_US:en"' >> /etc/default/locale"

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 23
8192
0
thg 9 20
3387
3
thg 6 24
1902
problem backup Đã xử lý
3
thg 6 24
6668
2
thg 3 24
3347