NFD环境配置以及jndn的安装

ndnSIM中可视化的解决办法 一直在做NDN相关的工作,主要平台依赖于ndnSIM。以前安装的时候遇到过无法看拓扑图的问题,后来倒腾了了一段时间,最后也不知道咋弄出来了,最近整理工作,再次遇到这个问题,便深究起来。ndnSIM官方安装过程忽略,基本没啥问题,本文也主要针对运行起来无法看拓扑图的问题进行探索。 进入ns-3目录,./waf configure 后,会遇到提示 “ Python Bindings  : not e 阅读详情

NFD的环境配置是个“有趣的探索”!这么多篇install.md,我TM要看哪一个?不论哪一个都缺失依赖库好嘛T^T被折腾了将近一个月,貌似找到一篇还比较靠谱的安装说明,再加上万能的谷歌和stackoverflow,目前配环境的速度越来越快了~~对于一个天天写bug,随时需要重装系统的人来说,配置环境可是一个很重要的一项基本技能好嘛!!!

废话少说,红色字体是肘子的血泪教训啊。
官方链接:


基于NFD的 Android 应用:https://github.com/YuanKQ/NFD_for_android

Step-By-Step - Common Client Libraries

This document shows step-by-step how to get a minimal NFD running so you can start writing applications to use the NDN Common Client Libraries (NDN-CPP, NDN-JS, PyNDN, jNDN).

Prerequisites

Ubuntu 12.04

In a terminal, enter:

sudo apt-get install build-essential git libssl-dev libsqlite3-dev libcrypto++-dev libpcap-dev libboost1.48-all-dev

Ubuntu 13.10, Ubuntu 14.04 and Ubuntu 15.04

In a terminal, enter:

sudo apt-get install build-essential git libssl-dev libsqlite3-dev libcrypto++-dev libpcap-dev libboost-all-dev 

If you are 64-bit, you must also install libstdc++6:i386 use the command: sudo apt-get install libstdc++6:i386, or you will get the following errors: when you successfully install nfd, and use the commond "nfd-start", you will see "/usr/local/bin/ndnsec: error while loading shared libraries: libndn-cxx.so.0.4.1: cannot open shared object file : no such file or directory".  If you have installed this library, you still can't solve this problem, you may still have to install lib32z1 : sudo apt-get install lib32z1.  
假如还是没有办法解决的话,那就是“no such file or directory”的原因了:建立软连接sudo ln -s /usr/local/lib/libndn-cxx.so.0.4.1 /usr/lib/

肘子在这里可是卡了很久很久啊~说出来都是泪啊~


Attention:
 This step is very import to solve the dependent libraries for ndn-cxx and nfd.

Build/Install NFD

These are steps from build/install NFD which work with the CCL. In a terminal, enter:

git clone https://github.com/named-data/ndn-cxx
git clone --recursive https://github.com/named-data/NFD
cd ndn-cxx
./waf configure

If waf says "program doxygen not found", "program sphinx-build not found" or "library rt not found", it is OK.

./waf
sudo ./waf install
cd ..
cd NFD
./waf configure

If waf says "libndn-cxx not found", then set PKG_CONFIG_PATH as shown in the Prerequisites above.

./waf
sudo ./waf install
cd ..

The NFD programs are installed in /usr/local/bin . The NFD configuration file is in /usr/local/etc/ndn . Copy the sample configuration file to make it the default:

sudo cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf

Ubuntu and Raspbian (Raspberry Pi)

[Ubuntu and Raspbian only] Update the path to the shared libraries:

sudo /sbin/ldconfig

Configure NFD

NFD provides mechanisms to enable strict authorization for all management commands. In particular, one can authorize only a specific public key to create new Faces or to change the strategy choice for specific namespaces. For more information about how to generate a private/public key pair, generate a self-signed certificate, and use this self-signed certificate to authorize NFD management commands, refer to NFD Configuration Tips.

In the sample configuration file, all authorization is disabled, effectively allowing anybody on the local machine to issue NFD management commands. The sample file is intended only for demo purposes and MUST NOT be used in a production environment.

Start NFD

Open a new terminal window (so you can watch the NFD messages) and enter:

nfd-start

On OS X it may ask for your keychain password or ask "nfd wants to sign using key in your keychain." Enter your keychain password and click Always Allow.

Later, you can stop NFD with nfd-stop .

Add a route to another NFD host (optional)

The previous instructions are good for testing on the local host. If you want to route an interest to another NFD host, in a terminal enter:

nfdc register /ndn udp://<other host>

where <other host> is the name or IP address of the other host (e.g., spurs.cs.ucla.edu). The "/ndn" means that NFD will forward all interests that start with /ndn through the face to the other host. If you only want to forward interests with a certain prefix then use it instead of "/ndn".

This only forwards interests to the other host, but there is no "back route" for the other host to forward interests to you. For that, you must go to the other host and use nfdc to add the route. (The "back route" can also be automatically configured with nfd-autoreg. For more information refer to nfd-autoreg manpage.)

Install the Common Client Library

If you haven't done so, get the library from GitHub and follow the INSTALL instructions for your language:

Send an Interest to receive a Data packet

The example program "test get async" is a simple program to send some interests and get a data packet. Here they are on the various languages:

The main calls to the API are (using Python for example):

Call the Face constructor and specify the host.

face = Face("aleph.ndn.ucla.edu")

Create a Name for the Interest, using a Name URI.

name1 = Name("/ndn/edu/ucla/remap/ndn-js-test/howdy.txt")

Call expressInterest, passing in the callbacks for onData and onTimeout.

face.expressInterest(name1, counter.onData, counter.onTimeout)

Start an event loop to keep calling processEvents until the application is finished. Your application should make sure that it calls processEvents in the same thread as expressInterest (which also modifies the pending interest table).

while counter._callbackCount < 3:
    face.processEvents()
    # We need to sleep for a few milliseconds so we don't use 100% of the CPU.
    time.sleep(0.01)

jndn:适用于Java的NDN客户端库 jNDN:Java的命名数据网络客户端库 jNDN是用Java编写的命名数据网络客户端库的新实现。 它是与NDN-TLV编码兼容的有线格式。 jNDN符合NDN通用客户端库API ,您的应用程序应遵循以下公共API: ://named-data.net/doc/ndn-ccl-api/。 安装 有关构建和安装说明,请参见文件 。 该库当前需要一个外部NDN守护程序,并且已经通过进行了测试。 报告错误 请将任何错误报告或功能请求提交给。 贡献 建议的代码贡献应使用。 执照 该程序是免费软件:您可以根据自由软件基金会发布的GNU通用通用公共许可证的条款重新分发和/或修改它,该许可证的版本为3,或者(根据您的选择)任何更高版本。 分发该程序是希望它会有用,但是没有任何保证; 甚至没有对适销性或特定用途适用性的暗示保证。 有关更多详细信息,请参见GNU较宽松通用公共许可证。 您应该已经与 立即下载

相关推荐

NFD安装步骤

NFD安装过程 首先下载源代码(在命令框中进入入好将要安装的目录 //源码在NFD/daemon下)

如何搭建和运行github上面使用maven构建的nfd工程

如何搭建和运行github上面使用maven构建的nfd工程: github地址:https://github.com/named-data/jndn 导入三个jar包: 至于向工程里导入jar包的方法如下: http://blog.youkuaiyun.com/mazhaojuan/article/details/21403717 肘子用的是第二种方法。 1.导入jndn-0.10.ja

programmer_at的专栏 1254

nfd_library

NFD库

NFD安装教程

基本和官网教程一致,但是官方教程有的地方不好理解,所以重新记录。 本文介绍从git下载安装的方法 一、下载文件 git clone https://github.com/named-data/ndn-cxx git clone --recursive https://github.com/named-data/NFD 其中–recursive选项是指下载时同时初始化参数。 二、安装依赖项 sud...

xjb写写 2210

STM32F407+HAL库+W5500实现TCP通讯 个人项目总结

推荐阅读此博客 cv即可成功首先需要一个可以进行串口调试的工程,方便进行调试。1.在W5500官网移植库文件重点是Ethernet这个文件夹将里面的 socket.c,socket.h,wizchip_conf.c,wizchip_conf.h,还有根据W5500文件夹里的w5500.c和w5500.h移植到自己的工程里面。然后再创建一个.c和.h文件 我的叫w5500_port_hal.c 和w5500_port_hal.h 记得将.h文件链接到工程里。

a234abr的博客 2248

RK3588开发板RKNPU2环境部署实战:更新rknn_server与librknnrt.so详解

本文详细介绍了在RK3588开发板上更新rknn_server与librknnrt.so核心组件的完整实战流程。通过adb工具推送文件、设置权限并执行同步操作,确保RKNPU2环境部署成功,从而解决推理速度慢或初始化失败等问题,提升AI模型运行效率与稳定性。

weixin_29194817的博客 344

NFD官方安装文档(Getting Started with NFD)

从二进制文件安装NFD(Installing NFD from Binaries)我们提供NFD二进制包安装支持, 这是首选的安装方法.除了简化安装之外,二进制版本还包括自动初始化配置与特定与平台的工具,以自动启动NFD和相关守护程序. 特别是在OS X和macOS NFD上使用launched进行控制,在Ubuntu上使用upstart机制进行控制.在这两种情况下,nfd-start和nfd-st

拂去烟尘的博客 1820

利用Python实现纬度加权平均(即NCL中的wgt_areaave)

当处理全球数据的时候,最常见的分析就是全球、北半球平均了,这时候一定要注意要根据纬度等信息进行加权,求加权平均,要不然结果肯定会不准。但是对于Python中,常规的计算包里面是没有的,或许现在有其他包可以实现,也可以告诉我~。

记录基于python语言处理气象问题的一些代码,包括不限于气象数据读取、机器学习和深度学习建模。 5745

Ubuntu18.04中NFD的安装(保姆级教程)

Ubuntu18.04中NFD的安装 NDN官网给出的教程不是很详细,优快云上,前辈们给的教程比较多但是相对分散,所以我打算把他们的内容搬运一下,方便像我一样的小白在Ubuntu里安装NFD。 1.更换国内的源 此处参考泉伟大佬的教程 Ubuntu更换国内源 补充: 教程里第2步 更换源 ,把原来的内容全部删除,换成阿里源或者国内的别的源。 执行 sudo apt-get upgrade 时会问你是否继续执行,按下y再回车即可。 2.下载git及NFD相关文件 这部分我参考了bit_xzh大佬的教程(

weixin_44525657的博客 1380

体验灵雀云-创建基于Docker的云服务

今天体验了一下灵雀云,创建了第一个基于Docker的云服务。 1.登录灵雀云 2.开始使用 登录之后,从"控制台"进入操作界面,开始创建服务。 首先需要选择一个镜像。灵雀云已经为您提供了一些常用的镜像列表。请在“常用镜像”列表中,选择“其它”,然后找到“alauda/hello-world”镜像,点击它右侧的“选择”按钮,进入服务参数配置页面。 选择完要创建的

tomcat的专栏 3234

深入解析音频信号处理的核心算法——傅里叶变换、语音增强、回声消除与主动降噪

本文系统介绍了现代音频信号处理的核心技术。首先阐述傅里叶变换作为理论基础的重要性,它能将声音分解为频域成分。随后重点分析三大关键技术:语音增强利用谱减法、维纳滤波和深度学习从噪声中提取人声;回声消除采用自适应滤波器消除通话中的回声;主动降噪通过声波干涉原理抵消环境噪声。文章最后指出,这些技术在实际应用中协同工作,形成完整的音频处理链路,共同提升语音质量和听觉体验。随着算法进步和算力提升,音频处理技术正向着更智能、更高效的方向发展。

程序猿老樊的博客 1328

在ubantu下进行NFD的安装

首先是要自己有一个ubantu系统。 可以用虚拟机,或者装个双系统,我装的双系统,ubantu系统具体的安装方法会再写一篇博客。 安装方法我基本参考NFD官网的get start with nfd 第一种PPA的方法没试过 主要是第二种方法: 打开命令行 # Download ndn-cxx git clone https://github.com/named-data/ndn-cxx # Dow...

wfh1992的博客 653

R 绘制环形树状图

按大类小类的从属关系绘制环形图,并把不同值的节点设置为相应大小。要求同一类的节点应为同一颜色。 按照输入,处理代码和输出记录

weixin_43718786的博客 1872

Python编程:文本和字节序列

Python经典进阶教程!

weixin_56051592的博客 525

基于Python实现学习进度跟踪系统

{{ task }}: {{ "%.1f"|format(hours) }}小时

寒寒豆豆软件公司的博客 196

手把手教你学Simulink--基础微电网场景实例:基于Simulink的混合交直流微电网架构仿真

本文基于Simulink构建混合交直流微电网仿真模型,通过交流子网(风电+交流负荷)和直流子网(光伏+储能+直流负荷)的协同控制,实现系统效率提升8.5%。重点介绍了混合架构原理、下垂控制策略及Simulink建模方法,包括核心模块实现、协调控制器代码和仿真参数设置。通过三种工况测试验证了系统性能:功率转移响应时间<0.5s,电压波动<5%,显著优于传统独立子网架构。文章还提供了进阶优化方向和完整代码清单,为微电网仿真研究提供实用参考。

MHD0815的博客 129

NFD模块功能介绍和包处理过程

NFD模块功能介绍 本文主要翻译自nfd开发者指南文档,为自己理清nfd中包转发的流程。 ndn-cxx library,core,NFD-Tools,NFD Essential Tools:提供不同NFD模块之间的公共服务,包括hash运算、DNS解析器、配置文件、接口控制等。 Faces:在各种底层传输机制上实现NDN端口抽象。 Table:三种数据结构(CS\PIT\FIB)以支持兴趣包...

MakiSlytherin的博客 2281

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

无题2

1、创建一个目录bishe2、cd到该目录下cd~/bishe第二部分 安装minindn3、下载特定版本的mini-ndn 0.1.1,一定要注意这个特定版本sudogit clone https://github.com/named-data/mini-ndn/tree/v0.1.1若显示git程序显示尚未a安装,则使用sudoapt-get install git 进行安装下载这个0.1.1...

zhangmeimei_pku的博客 664

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

error while loading shared libraries错误的原因及解決方法

在linux下运行程序时,发现了error while loading shared libraries这种错误。

理想不再遥不可及 10万+

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

linux之dup和dup2函数解析

本文转载,原文地址:http://blog.youkuaiyun.com/fulinus/article/details/9669177#comments1、文件描述符在内核中数据结构  在具体说dup/dup2之前,我认为有必要先了解一下文件描述符在内核中的形态。一个进程在此存在期间,会有一些文件被打开,从而会返回一些文件描述符,从shell中运行一个进程,默认会有3个文件描述符存在(0、1、2),0与进程的

倚楼听风雨的博客 8万+

解决error while loading shared libraries: libXXX.so.X: cannot open shared object file: No such file

原文转自,有改动一、问题运行hydra时,提示错误:hydra : error : while loading shared libraries: libssh.so.4: cannot open shared object file: No such file分析原因:链接器ld提示找不到库文件。ld默认的目录是/lib和/usr/lib,如果放在其他路径也可以,需要让ld知道库文件所在的路径。二

yjk13703623757的博客 10万+

什么是JNDI?

        JNDI是Java Naming and Directory Interface(JAVA命名和目录接口)的英文简写,它是为JAVA应用程序提供命名和目录访问服务的API(Application Programing Interface,应用程序编程接口)。 1.命名的概念与应用          JNDI中的命名(Naming),就是将Java对象以某个名称的形式绑定(bindi...

Cloud-Future的博客 3万+

Node.JS实战36:写一个WAF中间件!防黑客,防攻击

如果用Node.JS做Web服务,很多时候是会选择Express的。 本文,将展示如何如何实现一个WAF中间件。 WAF有什么用? WAF即Web Application Firewall,Web应用防火墙,防攻击、防黑客的。 小提示:npm上,目前还没有专业的express中间件WAF,这可是稀缺的技术! 先看完整示例代码: var express = require('ex...

w2sft的博客 1129
上一篇: 如何搭建和运行github上面使用maven构建的nfd工程
下一篇: NFD for Android环境配置
猪杂汤饭
博客等级 码龄12年 240粉丝 67原创
评论 21
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值