安装samba实现共享文件夹时遇到的一些依赖关系问题(ubuntu1204)



//----------------------------------------------------------------------------------------------------------------
sudo apt-get install samba
遇到依赖关系,下面2个版本冲突
samba-common
libwbclient0


//----------------------------------------------------------------------------------------------------------------
xcz@xcz-OptiPlex-3020:~/Desktop$ 
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get remove samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package samba is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


//----------------------------------------------------------------------------------------------------------------
xcz@xcz-OptiPlex-3020:~/Desktop$ 
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get remove libwbclient0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apturl-common apturl
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  gvfs-backends libsmbclient libwbclient0 nautilus-share python-smbc
  samba-common-bin smbclient system-config-printer-common
  system-config-printer-gnome ubuntu-desktop
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
After this operation, 72.5 MB disk space will be freed.
Do you want to continue [Y/n]? 
--》Y


//----------------------------------------------------------------------------------------------------------------
xcz@xcz-OptiPlex-3020:~/Desktop$ 
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get remove samba-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libtalloc2 python-cupshelpers libcdio-paranoia1 python-gnomekeyring
  apturl-common avahi-utils system-config-printer-udev apturl libcdio-cdda1
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  samba-common
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 682 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 162670 files and directories currently installed.)
Removing samba-common ...
xcz@xcz-OptiPlex-3020:~/Desktop$ 
xcz@xcz-OptiPlex-3020:~/Desktop$ 
xcz@xcz-OptiPlex-3020:~/Desktop$ 


//----------------------------------------------------------------------------------------------------------------
xcz@xcz-OptiPlex-3020:~/Desktop$ 
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get install samba samba-common system-config-samba winbind 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python-cupshelpers libcdio-paranoia1 python-gnomekeyring apturl-common
  avahi-utils system-config-printer-udev apturl libcdio-cdda1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libpam-winbind libuser1 libwbclient0 python-central python-libuser
  samba-common-bin tdb-tools
Suggested packages:
  openbsd-inetd inet-superserver smbldap-tools ldb-tools ctdb
The following NEW packages will be installed:
  libpam-winbind libuser1 libwbclient0 python-central python-libuser samba
  samba-common samba-common-bin system-config-samba tdb-tools winbind
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 25.2 MB of archives.
After this operation, 62.8 MB of addi


//----------------------------------------------------------------------------------------------------------------
之后发现
smb://xxx.xx.x.XXX/ 访问不了
并且ubuntu-desktop被卸掉了,现在再恢复回去
//----------------------------------------------------------------------------------------------------------------
The following packages will be REMOVED:
  gvfs-backends libsmbclient libwbclient0 nautilus-share python-smbc
  samba-common-bin smbclient system-config-printer-common
  system-config-printer-gnome ubuntu-desktop
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.




The following NEW packages will be installed:
  libpam-winbind--- libuser1 libwbclient0 python-central python-libuser samba---
  samba-common---- samba-common-bin--- system-config-samba----- tdb-tools winbind-----
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.


//------------------------------------------------------------------------------------remove
把安装的都卸掉(截的片段,仅参考)


The following NEW packages will be installed:
   libuser1 libwbclient0 python-central python-libuser
    tdb-tools
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.


//-------------------------------------------1
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get remove samba samba-common system-config-samba winbind 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libtalloc2 python-cupshelpers libcdio-paranoia1 libwbclient0 python-central
  python-gnomekeyring apturl-common tdb-tools avahi-utils
  system-config-printer-udev libuser1 apturl libcdio-cdda1 python-libuser
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libpam-winbind samba samba-common samba-common-bin system-config-samba
  winbind
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
After this operation, 61.9 MB disk space will be freed.
Do you want to continue [Y/n]? 


//----------------------------------------2
The following packages were automatically installed and are no longer required:
  libtalloc2 python-cupshelpers libcdio-paranoia1 python-gnomekeyring
  apturl-common avahi-utils system-config-printer-udev apturl libcdio-cdda1
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libuser1 libwbclient0 python-central python-libuser tdb-tools
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 903 kB disk space will be freed.
Do you want to continue [Y/n]? 


//---------------------------------------------------------------------remove --end


//----------------------------------------------------------------------------------------------------------------
下面再把原来remove掉的装回来(截的片段,仅参考)


The following packages will be REMOVED:
  gvfs-backends libsmbclient libwbclient0 nautilus-share python-smbc
  samba-common-bin smbclient system-config-printer-common
  system-config-printer-gnome ubuntu-desktop
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.


The following packages will be REMOVED:
  gvfs-backends libsmbclient----- libwbclient0---- nautilus-share--- python-smbc---
  samba-common-bin--- smbclient--- system-config-printer-common-----
  system-config-printer-gnome---- ubuntu-desktop----
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.


sudo apt-get install libwbclient0


The following NEW packages will be installed:
  nautilus-share samba-common samba-common-bin


The following NEW packages will be installed:
  python-smbc system-config-printer-common




The following extra packages will be installed:
  linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic linux-headers-generic
The following NEW packages will be installed:
  linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic linux-headers-generic
  ubuntu-desktop
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.4 MB of archives.
|
|
|
sudo apt-get install gvfs-backends
The following packages have unmet dependencies:
 gvfs-backends : Depends: gvfs (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is to be installed
                 Depends: gvfs-daemons (= 1.12.1-0ubuntu1)
                 Depends: gvfs-libs (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is to be installed
                 Depends: gvfs-common (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.
|
|
|
xcz@xcz-OptiPlex-3020:~$ 
xcz@xcz-OptiPlex-3020:~$ sudo aptitude install gvfs-backends
The following NEW packages will be installed:
  gvfs-backends{b} 
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,012 kB of archives. After unpacking 2,877 kB will be used.
The following packages have unmet dependencies:
 gvfs-backends : Depends: gvfs (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is installed.
                 Depends: gvfs-daemons (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is installed.
                 Depends: gvfs-libs (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is installed.
                 Depends: gvfs-common (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is installed.
The following actions will resolve these dependencies:


     Remove the following packages:                       
1)     unity-launcher-folders                             


     Keep the following packages at their current version:
2)     gvfs-backends [Not Installed]                      






Accept this solution? [Y/n/q/?] 
||
||
||
choose Y and remove unity-launcher-folders ==>Unity 橱窗 这个软件本来就是ubuntu-1404上的,有依赖问题,后来一直没删
||
sudo aptitude install gvfs-backends


     Keep the following packages at their current version:
2)     gvfs-backends [Not Installed]  
Accept this solution? [Y/n/q/?] 
||
choose N and then choose Y to upgrade the version of depends packages






//----------------------------------------------------------------------------------------------------------------
sudo apt-get install samba
==>ok


//----------------------------------------------------------------------------------------------------------------
要共享的文件夹-->右击-->Proprerties-->Share
-->勾选下面三个选项
(1)Share this folder
(2)Allow others to create and delete ...
(3)Guest access


//----------------------------------------------------------------------------------------------------------------

ok,别人可以访问你的共享文件夹了


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在Ubuntu上配置Samba共享文件夹,您可以按照以下步骤进行操作: 1. 确保您的Ubuntu系统已经安装Samba软件包。您可以使用以下命令来安装它: ``` sudo apt update sudo apt install samba ``` 2. 打开Samba的配置文件 `/etc/samba/smb.conf`,使用以下命令: ``` sudo nano /etc/samba/smb.conf ``` 3. 在文件的末尾,添加一个新的共享配置段。例如,您可以使用以下内容: ``` [share] comment = Shared Folder path = /path/to/shared/folder browseable = yes read only = no guest ok = yes ``` 其中,`[share]` 是共享的名称,`comment` 是对共享的描述,`path` 是要共享的文件夹路径。您可以根据需要进行修改。 4. 保存并关闭文件(使用 `Ctrl+X`,然后输入 `Y` 以保存更改)。 5. 为Samba创建一个密码,您可以使用下面的命令来设置密码: ``` sudo smbpasswd -a username ``` 将 `username` 替换为您要设置密码的用户的用户名,并按照提示输入密码。 6. 重启Samba服务以使配置生效: ``` sudo service smbd restart ``` 现在,您应该可以通过Windows或其他设备上的网络浏览器访问共享文件夹。在资源管理器中,尝试输入 `\\<Ubuntu_IP_Address>\share`,其中 `<Ubuntu_IP_Address>` 是您的Ubuntu系统的IP地址,`share` 是您在配置文件中设置的共享名称。 请注意,这只是Samba配置的基本步骤。根据您的需求,您可能需要进一步进行配置以满足特定的共享要求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值