我对 Ubuntu 还很陌生,我想从位于我网络中的存储库安装软件包。所以:
我首先使用以下方法编辑了来源列表:
sudo nano /etc/apt/sources.list
在源列表中我评论了所有内容,因此它不会尝试从互联网更新软件包,并添加了存储库所在的地址:
deb file:/home/ragnar/.gvfs/shared%20on%20ubuntu-i3/mydebs ./
我尝试用 %20 更改每个“空格”,但仍然无法在网络上找到它。
因此,sudo apt-get update
抛出之后:
Ign file: ./ InRelease
Ign file: ./ Release.gpg
Ign file: ./ Release
Err file: ./ Packages
File not found
Ign file: ./ Translation-en_US
Ign file: ./ Translation-en
W: Failed to fetch file:/home/ragnar/.gvfs/shared on ubuntu-i3/mydebs/./Packages File not found
E: Some index files failed to download. They have been ignored, or old ones used instead.
那么,我可以更改 .gvfs 中的文件名“shared on ubuntu”以使其不带任何空格吗,或者还有其他方法可以做到这一点吗?
提前致谢。
编辑1
好吧,我替换了%20
并\
得到了下一个输出(重要的是,在替换它之前我sudo apt-get update
确实得到了完全相同的输出):
Ign file: ./ InRelease
Ign file: ./ Release.gpg
Ign file: ./ Release
Err file: ./ Packages
File not found
Ign file: ./ Translation-en_US
Ign file: ./ Translation-en
Ign http://ppa.launchpad.net precise InRelease
Get:1 http://ppa.launchpad.net precise Release.gpg [316 B]
Get:2 http://ppa.launchpad.net precise Release [12.9 kB]
Ign http://ppa.launchpad.net precise Release
Ign http://ppa.launchpad.net precise/main Sources/DiffIndex
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex
Get:3 http://ppa.launchpad.net precise/main TranslationIndex [199 B]
Get:4 http://ppa.launchpad.net precise/main Sources [1,101 B]
Get:5 http://ppa.launchpad.net precise/main i386 Packages [1,962 B]
Get:6 http://ppa.launchpad.net precise/main Translation-en [2,123 B]
Fetched 18.6 kB in 24s (764 B/s)
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 32B18A1260D8DA0B
W: Failed to fetch file:/home/ragnar/.gvfs/shared\on\ubuntu-i3/mydebs/./Packages File not found
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案1
好吧,我设法解决了这个问题。
sudo apt-get install smbclient smbfs
smbclient
需要看到网络上的共享资源,并且smbfs
需要能够在您的计算机上安装共享资源。
因此你只需要写:
sudo mount -t smbfs //IP_address/shared_folder /home/username/my_folder -o user=username
然后我编辑了该文件sources.list
,一切都正常了。