Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: Yajl cannot be found. #70

Open
tonysy opened this issue Apr 7, 2024 · 2 comments
Open

OSError: Yajl cannot be found. #70

tonysy opened this issue Apr 7, 2024 · 2 comments

Comments

@tonysy
Copy link

tonysy commented Apr 7, 2024

MacOS:

python -m openaoe.main -f openaoe/backend/config/config-template.yaml
Traceback (most recent call last):
  File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/zhangsongyang/Projects/OpenAOE/openaoe/main.py", line 10, in <module>
    from openaoe.backend.api.route_google import router as google
  File "/Users/zhangsongyang/Projects/OpenAOE/openaoe/backend/api/route_google.py", line 4, in <module>
    from openaoe.backend.service.service_google import palm_chat_svc, Gemma
  File "/Users/zhangsongyang/Projects/OpenAOE/openaoe/backend/service/service_google.py", line 4, in <module>
    from jsonstreamer import ObjectStreamer
  File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/site-packages/jsonstreamer/__init__.py", line 9, in <module>
    from jsonstreamer.jsonstreamer import JSONStreamer, ObjectStreamer
  File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/site-packages/jsonstreamer/jsonstreamer.py", line 14, in <module>
    from .yajl.parse import YajlParser, YajlListener, YajlError
  File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/site-packages/jsonstreamer/yajl/parse.py", line 31, in <module>
    yajl = load_lib()
  File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/site-packages/jsonstreamer/yajl/parse.py", line 28, in load_lib
    raise OSError('Yajl cannot be found.')
OSError: Yajl cannot be found.
@celster
Copy link

celster commented May 15, 2024

I experince similar (Linux):

Python 3.7.16 (default, May 23 2023, 14:46:23)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.

from jsonstreamer import JSONStreamer

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/site-packages/jsonstreamer/init.py", line 9, in
from jsonstreamer.jsonstreamer import JSONStreamer, ObjectStreamer
File "/usr/local/lib/python3.7/site-packages/jsonstreamer/jsonstreamer.py", line 14, in
from .yajl.parse import YajlParser, YajlListener, YajlError
File "/usr/local/lib/python3.7/site-packages/jsonstreamer/yajl/parse.py", line 31, in
yajl = load_lib()
File "/usr/local/lib/python3.7/site-packages/jsonstreamer/yajl/parse.py", line 28, in load_lib
raise OSError('Yajl cannot be found.')
OSError: Yajl cannot be found.

@twpengit
Copy link

  1. try to download Yajl source code from https://github.com/lloyd/yajl/tree/2.1.0, compile and install (reference https://cloud.tencent.com/developer/ask/sof/117097623)
  2. create an link file of /usr/local/lib/libyajl.so.2 in /usr/lib/
    sudo ln -s /usr/local/lib/libyajl.so.2 /usr/lib/libyajl.so
    sudo ln -s /usr/local/lib/libyajl.so.2 /usr/lib/libyajl.so.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants