# libnfs

```
# install libnfs
sudo apt-get install libnfs-dev
# set up 
git clone https://github.com/sahlberg/libnfs-python.git
cd libnfs-python/
cd libnfs/
make
# met error
cc -c -O2 -fPIC -I/usr/include $(python2.7-config --cflags) libnfs_wrap.c
/bin/sh: 1: python2.7-config: not found
libnfs_wrap.c:149:11: fatal error: Python.h: No such file or directory
 # include <Python.h>
           ^~~~~~~~~~
compilation terminated.
Makefile:12: recipe for target 'libnfs_wrap.o' failed
make: *** [libnfs_wrap.o] Error 1
# solution:  sudo apt-get install python-dev # for python 2.7
# it only works for python 2.7

# Miroslav Klivansky: https://www.youtube.com/watch?v=smnshI7ol68
# test 
# https://github.com/sahlberg/libnfs-python
import libnfs
nfs = libnfs.NFS('nfs://198.18.0.100/test')
a=nfs.open('/foo-test', mode='w+')
a.write("Test string")
a.close()
print nfs.open('/foo-test', mode='r').read()
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lwang010.gitbook.io/longw/mlops/chap-3.-hardware-maintain/storage-data-center/libnfs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
