OS: Ubuntu16.04
Hardware: PCx86
需求
公司共享磁盤更換爲 Apple 的 afp 形式的了。
步驟
Ubuntu下掛載步驟如下:
sudo apt-get install libfuse-dev libreadline-dev
git clone https://github.com/simonvetter/afpfs-ng
cd afpfs-ng
./configure
make
sudo make install
sudo ldcondig
試一下:
mount_afp
Usage:
mount_afp [-o volpass=password] <afp url> <mountpoint>
成功~
最後掛載的用法見:https://linux.die.net/man/1/mount_afp
mount_afp afp://username:[email protected]/volumename/ /Volumes/mntpnt
對於我而言是:
mount_afp afp://younix:[email protected]/技術研發中心/ /home/younix/AFP_SERVER
Mounting 技術研發中心 from 6.6.6.6 on /home/younix/AFP_SERVER
Mounting of volume 技術研發中心 from server MYCOMPANY succeeded.
成功~
問題
如果出現:
mount_afp
mount_afp: error while loading shared libraries: libafpclient.so.0: cannot open shared object file: No such file or directory
是由於 libpthread.so.0 鏈接的不對
find . -name libafpclient.so.0
./lib/.libs/libafpclient.so.0
cp lib/.libs/libafpclient.so.0 /lib/x86_64-linux-gnu/
參考文章:
https://stackoverflow.org/wiki/Mount_an_AFP_share_from_Linux
https://askubuntu.com/questions/886656/how-can-i-mount-an-afp-share
https://linux.die.net/man/1/mount_afp
另一篇:
《Linux下訪問NAS服務器》也在我的博客中,大家請自行查找