十大购物网站排行榜,一站式网站建设平台,wordpress拨号功能,公司介绍网站平台搭建设计论文本篇并不介绍做整个项目的过程#xff0c;仅仅是个人在科研过程中的debug记录和心得。希望某个部分是你正需要的解决方案。
第一部分#xff1a;在服务器上安装mininet
mininet是一个在安装过程中比较容易出问题的包。一定要好好看看官方INSTALL文档。Download/Get Started…本篇并不介绍做整个项目的过程仅仅是个人在科研过程中的debug记录和心得。希望某个部分是你正需要的解决方案。
第一部分在服务器上安装mininet
mininet是一个在安装过程中比较容易出问题的包。一定要好好看看官方INSTALL文档。Download/Get Started With Mininet
最简单的方式是下载Mininet镜像虚拟机但是一开始我使用的实验室的服务器所以选择clone再安装。实验室的服务器使用LXD容器形式Ubuntu版本22.04。
服务器由于某些原因无法上外网所以使用本地IPv6拉代理上外网该方法在其他服务器或虚拟机上能不能实现不知道。具体步骤是①打开clash for wins的allow LAN并记下端口号②在本地通过ipconfig查看ipv6地址③服务器命令行中输入export http_proxyhttp://[你的ipv6地址]:本地代理端口号 export https_proxyhttps://[你的ipv6地址]:本地代理端口号④在服务器命令行中输入“ wget http://www.baidu.com”测试如果能够获取index.html即为成功。
通过以上步骤成功git clone https://github.com/mininet/mininet.git至服务器。接着运行mininet/utils/install.sh -a。
运行mininet的安装脚本时出现了错误
-DVERSION\PYTHONPATH. python -B bin/mn --version 21\ mnexec.c -o mnexec
command-line: warning: missing terminating character
mnexec.c: In function ?main?:
command-line: error: missing terminating character
mnexec.c:208:28: note: in expansion of macro ?VERSION?208 | printf(%s\n, VERSION);| ^~~~~~~
mnexec.c:208:35: error: expected expression before ?)? token208 | printf(%s\n, VERSION);| ^
make: *** [Makefile:50: mnexec] Error 1通过建立软链接的方式解决问题参考【排坑向】Mininet完全安装指南
sudo ln -s /usr/bin/python3 /usr/bin/python接着出现以下错误
Setting up openvswitch-switch (2.17.8-0ubuntu0.22.04.1) ...
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142.
A dependency job for openvswitch-switch.service failed. See journalctl -xe for details.
invoke-rc.d: initscript openvswitch-switch, action start failed.
? openvswitch-switch.service - Open vSwitchLoaded: loaded (/lib/systemd/system/openvswitch-switch.service; enabled; vendor preset: enabled)Drop-In: /run/systemd/system/service.d??zzz-lxc-service.confActive: inactive (dead)systemd[1]: Dependency failed for Open vSwitch.
openvswitch-switch.service: Job openvswitch-switch.service/start failed with result dependency.输入journalctl -xe命令得到
pam_unix(sudo:session): session opened for user root(uid0) by (uid1001)
pam_unix(sudo:session): session closed for user root
username : TTYpts/2 ; PWD/home/username/Documents/mininet ; USERroot ; ENVPYTHONpython ; COMMAND/usr/bin/make
pam_limits(sudo:session): Could not set limit for core to soft0, hard-1: Operation not permitted; uid1001,euid0大意就是出现了与pam_limits和资源限制相关的错误。需要编辑/etc/security/limits.conf文件来设置资源限制。但是因为我无权修改所以服务器这条路彻底走不通了于是才使用了虚拟机。
第二部分在虚拟机上安装mininet
在虚拟机上安装mininet异常顺利。 虚拟机配置 VMware 16 pro Ubuntu20.04 创建虚拟环境pytorchpython版本3.7
听到说不要用太新的Ubuntu版本可能会有问题。
出现了一下问题
-DVERSION\PYTHONPATH. python -B bin/mn --version 21\ mnexec.c -o mnexec
command-line: warning: missing terminating character
/usr/bin/ld: cannot find 1:: No such file or directory
/usr/bin/ld: cannot find python:: No such file or directory
/usr/bin/ld: cannot find not: No such file or directory
/usr/bin/ld: cannot find found: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:50: mnexec] Error 1可通过建立软链接解决。其余问题就是因为连外网不稳定导致依赖无法clone下来。解决这个问题我是等着能连上了就赶紧安装mininet也可以搜索一下虚拟机连外网的方法。
第三部分本地vscode连接虚拟机
参考自vscode 连接虚拟机Ubuntu系列问题
安装ssh的时候出现了点小问题先是输入命令sudo apt - get install openssh-server出现以下报错
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?可以先重启一下系统如果还是无法解决可以按照Linux 报错Could not get lock /var/lib/dpkg/lock 该如何解决呢或How to Fix ‘E: Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu Linux尝试解决。
持续更新……