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

kclvm not work on Ubuntu 20.10+ #314

Closed
amyXia1994 opened this issue Nov 29, 2022 · 2 comments
Closed

kclvm not work on Ubuntu 20.10+ #314

amyXia1994 opened this issue Nov 29, 2022 · 2 comments
Assignees

Comments

@amyXia1994
Copy link
Contributor

Bug Report

I installed kclvm on ubuntu 22.04 and run kcl and it produces following error:

ImportError: libffi.so.7: cannot open shared object file: No such file or directory

https://askubuntu.com/questions/1286772/libffi-so-7-cannot-open-shared-object-file-no-such-file-or-directory

1. Minimal reproduce step (Required)

docker run -it mcr.microsoft.com/devcontainers/base:ubuntu sh
root ➜ / $ cat  /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root ➜ / $ mkdir -p /home/vscode/.kusion
root ➜ / $ wget -c https://github.com/KusionStack/kusion/releases/download/v0.7.1/kusion-ubuntu.tgz -qO - | tar xz -C /home/vscode/.kusion
root ➜ / $ export PATH=$PATH:/home/vscode/.kusion/bin:/home/vscode/.kusion/kclvm/bin
root ➜ / $ kcl

2. What did you expect to see? (Required)

kcl help message

3. What did you see instead (Required)

Traceback (most recent call last):
  File "/home/vscode/.kusion/kclvm/lib/python3.7/runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
  File "/home/vscode/.kusion/kclvm/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/vscode/.kusion/kclvm/lib/python3.7/kclvm/__main__.py", line 3, in <module>
    import kclvm.internal.kclvm_internal.main as main
  File "/home/vscode/.kusion/kclvm/lib/python3.7/kclvm/internal/kclvm_internal/__init__.py", line 1, in <module>
    import kclvm.config as config
  File "/home/vscode/.kusion/kclvm/lib/python3.7/kclvm/config/__init__.py", line 26, in <module>
    from .modfile_pb2 import KclModFile
  File "/home/vscode/.kusion/kclvm/lib/python3.7/kclvm/config/modfile_pb2.py", line 8, in <module>
    from google.protobuf import reflection as _reflection
  File "/home/vscode/.kusion/kclvm/lib/python3.7/site-packages/google/protobuf/reflection.py", line 51, in <module>

     from google.protobuf import message_factory
  File "/home/vscode/.kusion/kclvm/lib/python3.7/site-packages/google/protobuf/message_factory.py", line 49, in <module>
    from google.protobuf.internal import python_message as message_impl
  File "/home/vscode/.kusion/kclvm/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 64, in <module>
    from google.protobuf.internal import extension_dict
  File "/home/vscode/.kusion/kclvm/lib/python3.7/site-packages/google/protobuf/internal/extension_dict.py", line 34, in <module>
    from google.protobuf.internal import type_checkers
  File "/home/vscode/.kusion/kclvm/lib/python3.7/site-packages/google/protobuf/internal/type_checkers.py", line 48, in <module>
    import ctypes
  File "/home/vscode/.kusion/kclvm/lib/python3.7/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: libffi.so.7: cannot open shared object file: No such file or directory

4. What is your KusionStack components version? (Required)

v0.7.1

@Peefy
Copy link
Contributor

Peefy commented Nov 29, 2022

Related issue #111

@Peefy
Copy link
Contributor

Peefy commented Dec 8, 2022

The KCL with versions above v0.4.4-alpha.2 no longer has built-in python3. This error will not be encountered. We can use the following command to install python3 3 and pip in ubuntu 22+ like #327

apt-get install python3 python3-pip -y

@Peefy Peefy closed this as completed Dec 8, 2022
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