reworkd / AgentGPT

🤖 Assemble, configure, and deploy autonomous AI Agents in your browser.
https://agentgpt.reworkd.ai
GNU General Public License v3.0
31.95k stars 9.25k forks source link

Start script fails in openSuse 15.5 #848

Closed gcpdev closed 1 year ago

gcpdev commented 1 year ago

Please check that this issue hasn't been reported before.

Expected Behavior

First of all, thanks for this great application, I used the web version and it seems to achieve my goals way better than other (more famous) agents.

When following the Readme instructions and running: git clone https://github.com/reworkd/AgentGPT.git && cd AgentGPT ./setup.sh should start the application

Current behaviour

On my machine, it unfortunately fails. Full log as follows:

# ./setup.sh

up to date, audited 146 packages in 659ms

27 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> agentgpt-cli@1.0.0 start
> node src/index.js

 █████╗  ██████╗ ███████╗███╗   ██╗████████╗ ██████╗ ██████╗ ████████╗
██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝██╔════╝ ██╔══██╗╚══██╔══╝
███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║   ██║  ███╗██████╔╝   ██║   
██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║   ██║   ██║██╔═══╝    ██║   
██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║   ╚██████╔╝██║        ██║   
╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝    ╚═════╝ ╚═╝        ╚═╝   

Welcome to the AgentGPT CLI! This CLI will generate the required .env files.
Copies of the generated envs will be created in `./next/.env` and `./platform/.env`.

Existing ./next/env file found. Validating...
? How will you be running AgentGPT? 🐋 Docker-compose (Recommended)
[+] Building 52.0s (32/35)                                                                                          
 => [agentgpt-next internal] load build definition from Dockerfile                                             0.0s
 => => transferring dockerfile: 32B                                                                            0.0s
 => [mysql:8.0 internal] load build definition from Dockerfile                                                 0.0s
 => => transferring dockerfile: 31B                                                                            0.0s
 => [agentgpt-platform internal] load build definition from Dockerfile                                         0.1s
 => => transferring dockerfile: 32B                                                                            0.0s
 => [agentgpt-next internal] load .dockerignore                                                                0.1s
 => => transferring context: 34B                                                                               0.0s
 => [agentgpt-platform internal] load .dockerignore                                                            0.1s
 => => transferring context: 35B                                                                               0.0s
 => [mysql:8.0 internal] load .dockerignore                                                                    0.1s
 => => transferring context: 2B                                                                                0.0s
 => [agentgpt-next internal] load metadata for docker.io/library/node:19-alpine                                0.9s
 => [agentgpt-platform internal] load metadata for docker.io/library/python:3.11-slim-buster                   0.8s
 => [mysql:8.0 internal] load metadata for docker.io/library/mysql:8.0                                         0.0s
 => [mysql:8.0 internal] load build context                                                                    0.0s
 => => transferring context: 31B                                                                               0.0s
 => [mysql:8.0 1/2] FROM docker.io/library/mysql:8.0                                                           0.2s
 => [mysql:8.0 2/2] ADD setup.sql /docker-entrypoint-initdb.d                                                  0.1s
 => [agentgpt-next] exporting to image                                                                         0.7s
 => => exporting layers                                                                                        0.0s
 => => writing image sha256:0cbbb9f07c601efa141eb88640490e7a304cfef8f92a1fecd11d79898c60c303                   0.0s
 => => naming to docker.io/library/mysql:8.0                                                                   0.0s
 => => writing image sha256:83633ee04b2888eef62ee4d097a687a43901e3a28a179727a333e818ffe9fca3                   0.0s
 => => naming to docker.io/library/agentgpt-next                                                               0.0s
 => [agentgpt-platform prod  1/10] FROM docker.io/library/python:3.11-slim-buster@sha256:c46b0ae5728c2247b999  0.0s
 => [agentgpt-platform internal] load build context                                                            0.1s
 => => transferring context: 6.79kB                                                                            0.0s
 => [agentgpt-next  1/10] FROM docker.io/library/node:19-alpine@sha256:8ec543d4795e2e85af924a24f8acb039792ae9  0.0s
 => [agentgpt-next internal] load build context                                                                0.1s
 => => transferring context: 17.60kB                                                                           0.0s
 => CACHED [agentgpt-platform prod  2/10] RUN apt-get update && apt-get install -y   default-libmysqlclient-d  0.0s
 => CACHED [agentgpt-platform prod  3/10] RUN pip install poetry==1.4.2                                        0.0s
 => CACHED [agentgpt-platform prod  4/10] RUN poetry config virtualenvs.create false                           0.0s
 => CACHED [agentgpt-platform prod  5/10] COPY pyproject.toml /app/src/                                        0.0s
 => CACHED [agentgpt-platform prod  6/10] WORKDIR /app/src                                                     0.0s
 => ERROR [agentgpt-platform prod  7/10] RUN poetry install --only main                                       50.8s
 => CACHED [agentgpt-next  2/10] RUN apk add --no-cache netcat-openbsd                                         0.0s
 => CACHED [agentgpt-next  3/10] WORKDIR /next                                                                 0.0s
 => CACHED [agentgpt-next  4/10] COPY package*.json ./                                                         0.0s
 => CACHED [agentgpt-next  5/10] RUN npm ci                                                                    0.0s
 => CACHED [agentgpt-next  6/10] COPY wait-for-db.sh /usr/local/bin/wait-for-db.sh                             0.0s
 => CACHED [agentgpt-next  7/10] RUN chmod +x /usr/local/bin/wait-for-db.sh                                    0.0s
 => CACHED [agentgpt-next  8/10] COPY . .                                                                      0.0s
 => CACHED [agentgpt-next  9/10] COPY entrypoint.sh /                                                          0.0s
 => CACHED [agentgpt-next 10/10] RUN apk add --no-cache dos2unix netcat-openbsd     && dos2unix /entrypoint.s  0.0s
------                                                                                                              
 > [agentgpt-platform prod  7/10] RUN poetry install --only main:                                                   
#0 1.033 Skipping virtualenv creation, as specified in config file.                                                 
#0 1.712 Updating dependencies                                                                                      
#0 1.713 Resolving dependencies...
#0 35.83 
#0 35.83 Writing lock file
#0 36.36 
#0 36.36 Package operations: 67 installs, 3 updates, 0 removals
#0 36.36 
#0 36.36   • Updating charset-normalizer (3.1.0 -> 2.0.12)
#0 36.36   • Installing frozenlist (1.3.3)
#0 36.36   • Installing marshmallow (3.19.0)
#0 36.36   • Installing multidict (6.0.4)
#0 36.37   • Installing mypy-extensions (1.0.0)
#0 36.37   • Installing sniffio (1.3.0)
#0 36.38   • Installing typing-extensions (4.5.0)
#0 36.38   • Updating urllib3 (1.26.16 -> 1.26.15)
#0 37.30   • Installing aiosignal (1.3.1)
#0 37.30   • Installing anyio (3.7.0)
#0 37.30   • Installing async-timeout (4.0.2)
#0 37.30   • Installing marshmallow-enum (1.5.1)
#0 37.30   • Installing numpy (1.25.0)
#0 37.31   • Installing protobuf (3.19.6)
#0 37.31   • Installing pydantic (1.10.9)
#0 37.31   • Updating requests (2.31.0 -> 2.28.0)
#0 37.37   • Installing tenacity (8.2.2)
#0 37.37   • Installing typing-inspect (0.9.0)
#0 37.37   • Installing yarl (1.9.2)
#0 42.45   • Installing aiohttp (3.8.4)
#0 42.45   • Installing dataclasses-json (0.5.8)
#0 42.46   • Installing decorator (5.1.1)
#0 42.46   • Installing googleapis-common-protos (1.59.1)
#0 42.46   • Installing langchainplus-sdk (0.0.16)
#0 42.46   • Installing numexpr (2.8.4)
#0 42.46   • Installing openapi-schema-pydantic (1.2.4)
#0 42.48   • Installing pyyaml (6.0)
#0 42.53   • Installing soupsieve (2.4.1)
#0 42.54   • Installing sqlalchemy (2.0.16)
#0 42.57   • Installing starlette (0.27.0)
#0 43.86   • Installing authlib (1.2.0)
#0 43.86   • Installing beautifulsoup4 (4.12.2)
#0 43.87   • Installing click (8.1.3)
#0 43.87   • Installing dnspython (2.3.0)
#0 43.87   • Installing fastapi (0.96.1)
#0 43.87   • Installing flupy (1.2.0)
#0 43.87   • Installing grpc-gateway-protoc-gen-openapiv2 (0.1.0)
#0 43.88   • Installing greenlet (2.0.2)
#0 43.95   • Installing grpcio (1.54.2)
#0 44.06   • Installing h11 (0.14.0)
#0 44.12   • Installing httptools (0.5.0)
#0 44.15   • Installing kafka-python (2.0.2)
#0 44.23   • Installing langchain (0.0.199)
#0 44.30   • Installing loguru (0.7.0)
#0 44.46   • Installing lz4 (4.3.2)
#0 44.55   • Installing pgvector (0.1.8)
#0 44.55   • Installing psycopg2-binary (2.9.6)
#0 44.63   • Installing pymysql (1.0.3)
#0 44.63   • Installing python-dateutil (2.8.2)
#0 44.64   • Installing python-dotenv (1.0.0)
#0 44.77   • Installing regex (2023.6.3)
#0 44.81   • Installing tqdm (4.65.0)
#0 45.04   • Installing uvloop (0.17.0)
#0 45.08   • Installing validators (0.20.0)
#0 45.69   • Installing watchfiles (0.19.0)
#0 45.78   • Installing websockets (11.0.3)
#0 47.80   • Installing aiokafka (0.8.1)
#0 47.80   • Installing aiomysql (0.1.1)
#0 47.80   • Installing lanarky (0.7.10)
#0 47.80   • Installing openai (0.27.8)
#0 47.80   • Installing pinecone-client (2.2.2)
#0 47.81   • Installing mysqlclient (2.2.0)
#0 47.81   • Installing replicate (0.8.3)
#0 47.81   • Installing sentry-sdk (1.26.0)
#0 47.86   • Installing tiktoken (0.4.0)
#0 47.93   • Installing ujson (5.8.0)
#0 48.23   • Installing uvicorn (0.22.0)
#0 48.26   • Installing vecs (0.2.6)
#0 48.29   • Installing weaviate-client (3.21.0)
#0 48.32   • Installing wikipedia (1.4.0)
#0 49.45 
#0 49.45   ChefBuildError
#0 49.45 
#0 49.45   Backend subprocess exited when trying to invoke get_requires_for_build_wheel
#0 49.45   
#0 49.45   /bin/sh: 1: pkg-config: not found
#0 49.45   /bin/sh: 1: pkg-config: not found
#0 49.45   Trying pkg-config --exists mysqlclient
#0 49.45   Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127.
#0 49.45   Trying pkg-config --exists mariadb
#0 49.45   Command 'pkg-config --exists mariadb' returned non-zero exit status 127.
#0 49.45   Traceback (most recent call last):
#0 49.45     File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
#0 49.45       main()
#0 49.45     File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#0 49.45       json_out['return_val'] = hook(**hook_input['kwargs'])
#0 49.45                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 49.45     File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
#0 49.45       return hook(config_settings)
#0 49.45              ^^^^^^^^^^^^^^^^^^^^^
#0 49.45     File "/tmp/tmp78h51nd4/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
#0 49.45       return self._get_build_requires(config_settings, requirements=['wheel'])
#0 49.45              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 49.45     File "/tmp/tmp78h51nd4/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
#0 49.45       self.run_setup()
#0 49.45     File "/tmp/tmp78h51nd4/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
#0 49.45       exec(code, locals())
#0 49.45     File "<string>", line 154, in <module>
#0 49.45     File "<string>", line 48, in get_config_posix
#0 49.45     File "<string>", line 27, in find_package_name
#0 49.45   Exception: Can not find valid pkg-config name.
#0 49.45   Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
#0 49.45   
#0 49.45 
#0 49.45   at /usr/local/lib/python3.11/site-packages/poetry/installation/chef.py:152 in _prepare
#0 49.47       148│ 
#0 49.47       149│                 error = ChefBuildError("\n\n".join(message_parts))
#0 49.47       150│ 
#0 49.47       151│             if error is not None:
#0 49.47     → 152│                 raise error from None
#0 49.47       153│ 
#0 49.47       154│             return path
#0 49.47       155│ 
#0 49.47       156│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
#0 49.47 
#0 49.47 Note: This error originates from the build backend, and is likely not a problem with poetry but with mysqlclient (2.2.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "mysqlclient (==2.2.0)"'.
#0 49.47 
------
failed to solve: executor failed running [/bin/sh -c poetry install --only main]: exit code: 1

I have the following versions installed:

 # npm -v
9.5.0
 # node -v
v18.14.2
 # cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.5"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.5"
PRETTY_NAME="openSUSE Leap 15.5"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.5"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap"
LOGO="distributor-logo-Leap"
 # docker -v
Docker version 20.10.23-ce, build 6051f1429
 # docker-compose -v
Docker Compose version 2.14.2

Let me know if you need any further information for your investigation.

Steps to reproduce

Simply running the start script, as described above.

Possible solution

Maybe Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually in the .env file, as suggested?

Which Operating Systems are you using?

Acknowledgements

hutao562 commented 1 year ago

I also encountered the same error log and hope for a prompt resolution.

64.71   ChefBuildError
64.71 
64.71   Backend subprocess exited when trying to invoke get_requires_for_build_wheel
64.71   
64.71   /bin/sh: 1: pkg-config: not found
64.71   /bin/sh: 1: pkg-config: not found
64.71   Trying pkg-config --exists mysqlclient
64.71   Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127.
64.71   Trying pkg-config --exists mariadb
64.71   Command 'pkg-config --exists mariadb' returned non-zero exit status 127.
64.71   Traceback (most recent call last):
64.71     File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>64.71       main()
64.71     File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
64.71       json_out['return_val'] = hook(**hook_input['kwargs'])
64.71                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64.71     File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
64.71       return hook(config_settings)
64.71              ^^^^^^^^^^^^^^^^^^^^^
64.71     File "/tmp/tmprw5yisee/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
64.71       return self._get_build_requires(config_settings, requirements=['wheel'])
64.71              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64.71     File "/tmp/tmprw5yisee/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
64.71       self.run_setup()
64.71     File "/tmp/tmprw5yisee/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
64.71       exec(code, locals())
64.71     File "<string>", line 154, in <module>
64.71     File "<string>", line 48, in get_config_posix
64.71     File "<string>", line 27, in find_package_name
64.71   Exception: Can not find valid pkg-config name.
64.71   Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
64.71   
64.71 
64.71   at /usr/local/lib/python3.11/site-packages/poetry/installation/chef.py:152 in _prepare
64.82       148│ 
64.83       149│                 error = ChefBuildError("\n\n".join(message_parts))
64.83       150│ 
64.83       151│             if error is not None:
64.83     → 152│                 raise error from None
64.83       153│ 
64.84       154│             return path
64.84       155│ 
64.84       156│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
64.84 
64.84 Note: This error originates from the build backend, and is likely not a problem with poetry but with mysqlclient (2.2.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "mysqlclient (==2.2.0)"'.
64.84 
------
failed to solve: process "/bin/sh -c poetry install --only main" did not complete successfully: exit code: 1
asim-shrestha commented 1 year ago

Thanks @chennqqi! Are you folks still getting this @hutao562 @gcpdev ?

jasangill1 commented 1 year ago

🤔 Your error message suggests that the command poetry install --only main failed to execute successfully, leading to a non-zero exit code (1). This typically indicates some form of error during the execution.

Possible causes could be:

Missing Dependencies: Your project may have dependencies that aren't installed or aren't being found.

Wrong Python Version: Your project might be using a Python version that's incompatible with one or more of your dependencies. You can check your current Python version with the following command:

Check the Python version you're using

python --version

Issues with Poetry: Sometimes, Poetry itself might run into problems. You can try updating it with the following command:

Update Poetry

pip install --upgrade poetry

gcpdev commented 1 year ago

Thanks @chennqqi! Are you folks still getting this @hutao562 @gcpdev ?

@asim-shrestha yes, I confirmed in the PR that it fixed the issue, so just replicating here