latest Cisco Trex traffic generator error on Ubuntu 24.04. Scapy ref. error has anyone been able to install Trex on ubuntu 24.04 with python 12 ?

1,223 views
Skip to first unread message

Foday Harris

unread,
Aug 20, 2024, 10:27:08 AM8/20/24
to TRex Traffic Generator
Has anyone solved this issue on Ubuntu 24.04 ? scapy not working.  This reference "from scapy.modules.six.moves" doesn't work with my kernel  6.8.0-40-generic 

Starting Scapy server.... Scapy server failed to run
Output: b'Traceback (most recent call last):\n  File "<frozen runpy>", line 198, in _run_module_as_main\n  File "<frozen runpy>", line 88, in _run_code\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/scapy_server/scapy_zmq_server.py", line 8, in <module>\n    from ..stl.api import *\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/stl/api.py", line 4, in <module>\n    from ..utils.common import *\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/utils/common.py", line 11, in <module>\n    from scapy.utils import *\n  File "/opt/trex/v3.05/external_libs/scapy-2.4.3/scapy/utils.py", line 29, in <module>\n    from scapy.modules.six.moves import range\nModuleNotFoundError: No module named \'scapy.modules.six.moves\'\nError in sys.excepthook:\nTraceback (most recent call last):\n  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 228, in partial_apport_excepthook\n    return apport_excepthook(binary, exc_type, exc_obj, exc_tb)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 114, in apport_excepthook\n    report["ExecutableTimestamp"] = str(int(os.stat(binary).st_mtime))\n                                            ^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: \'/opt/trex/v3.05/automation/trex_control_plane/interactive/-m\'\n\nOriginal exception was:\nTraceback (most recent call last):\n  File "<frozen runpy>", line 198, in _run_module_as_main\n  File "<frozen runpy>", line 88, in _run_code\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/scapy_server/scapy_zmq_server.py", line 8, in <module>\n    from ..stl.api import *\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/stl/api.py", line 4, in <module>\n    from ..utils.common import *\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/utils/common.py", line 11, in <module>\n    from scapy.utils import *\n  File "/opt/trex/v3.05/external_libs/scapy-2.4.3/scapy/utils.py", line 29, in <module>\n    from scapy.modules.six.moves import range\nModuleNotFoundError: No module named \'scapy.modules.six.moves\'\n'
Could not start scapy daemon server, which is needed by GUI to create packets.
If you don't need it, use --no-scapy-server flag.
ERROR encountered while configuring TRex system

Anton Matvienko

unread,
Sep 3, 2024, 3:17:32 AM9/3/24
to TRex Traffic Generator
Hi! You need to install Python3.11 and create venv for it:
```
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update && sudo apt install python3.11 python3.11-venv
python3.11 -m venv venv
source ./venv/bin/activate
```
Then you may need to install some dependencies in that venv (global install won't work):
```
venv/bin/python venv/bin/pip install cffi
```

вторник, 20 августа 2024 г. в 17:27:08 UTC+3, Foday Harris:
Reply all
Reply to author
Forward
0 new messages