Samba не устанавливается из-за поврежденных пакетов

Samba не устанавливается из-за поврежденных пакетов

Я использую Ubuntu Server 14.04.4 и не установил Samba с оригинальной настройкой ОС. Я хотел бы установить его сейчас, но я постоянно получаю ошибку о сломанных пакетах. Похоже, что основная проблема — это зависимость samba-libs. Там написано:

Depends: libldb1 (< 1:1.1.25~) but 2:1.1.17-2 is to be installed

Но у меня уже установлена ​​последняя версия libldb1. Я перепробовал почти все, что смог найти в гугле, но, возможно, я что-то упускаю из виду. Буду очень признателен за любые указания.

Вот что происходит:

root@MAILSVR:/etc/apt# sudo apt-get  install  samba
Reading package lists... Done 
Building dependency tree        
Reading state information... Done 
Some packages could not be installed. 
This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. 
The following information may help to resolve the situation:

The following packages have unmet dependencies:  samba : Depends: python-samba but it is not going to be installed
         Depends: samba-common-bin (= 2:4.3.8+dfsg-0ubuntu0.14.04.2) but it is not going to be installed
         Depends: samba-libs (= 2:4.3.8+dfsg-0ubuntu0.14.04.2) but it is not going to be installed
         Recommends: samba-dsdb-modules but it is not going to be installed
         Recommends: samba-vfs-modules but it is not going to be installed 
         E: Unable to correct problems, you have held broken packages.

Вот что aptitudeмне даёт:

root@MAILSVR:/etc/apt# aptitude install samba

The following NEW packages will be installed:
  libwbclient0{a} python-crypto{a} python-ldb{ab} python-samba{a} python-talloc{a} python-tdb{ab} samba samba-common{a} samba-common-bin{a} samba-dsdb-modules{a} 
  samba-libs{ab} samba-vfs-modules{a} tdb-tools{a} 
0 packages upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,519 kB of archives. After unpacking 48.3 MB will be used.
The following packages have unmet dependencies:
 python-tdb : Depends: libtdb1 (= 1.3.8-0ubuntu0.14.04.1) but 1.3.8-2 is installed.
 samba-libs : Depends: libldb1 (< 1:1.1.25~) but 2:1.1.17-2 is installed.
 python-ldb : Depends: libldb1 (= 1:1.1.24-0ubuntu0.14.04.1) but 2:1.1.17-2 is installed.
The following actions will resolve these dependencies:


     Keep the following packages at their current version:
1)     python-ldb [Not Installed]                         
2)     python-samba [Not Installed]                       
3)     python-tdb [Not Installed]                         
4)     samba [Not Installed]                              
5)     samba-common-bin [Not Installed]                   
6)     samba-dsdb-modules [Not Installed]                 
7)     samba-libs [Not Installed]                         
8)     samba-vfs-modules [Not Installed]                  


     Leave the following dependencies unresolved:         
9)     samba-common recommends samba-common-bin           




Accept this solution? [Y/n/q/?]

samba-libsошибка:

root@MAILSVR:/etc/apt# apt-get install samba-libs
Reading package lists... Done

Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:


The following packages have unmet dependencies:
 samba-libs : Depends: libldb1 (< 1:1.1.25~) but 2:1.1.17-2 is to be installed
E: Unable to correct problems, you have held broken packages.

решение1

Проблема была в источниках пакетов, поэтому я изменил свой /etc/apt/sources.list обратно на значение по умолчанию с помощьюrepogen.simplylinux.ch

Затем я выполнил следующие команды:

apt-get update
apt-get autoremove libtdb1 --purge
apt-get install libtdb1=1.3.8-0ubuntu0.14.04.1
apt-get install samba

Готово. Спасибо за помощь!

решение2

Следующая команда помогла мне установить Samba поверх Ubuntu 18.04.2 LTS:

sudo aptitude install samba

Выход:

The following NEW packages will be installed:
  attr{a} ibverbs-providers{a} libcephfs2{a} libibverbs1{a} libldb1{a} 
  libnl-route-3-200{a} librados2{a} libtdb1{a} python-crypto{a} 
  python-dnspython{a} python-ldb{a} python-samba{a} python-tdb{a} samba 
  samba-common{a} samba-common-bin{a} samba-dsdb-modules{ab} samba-libs{ab} 
  samba-vfs-modules{a} tdb-tools{a} 
0 packages upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.1 MB of archives. After unpacking 70.7 MB will be used.
The following packages have unmet dependencies:
 samba-dsdb-modules : Depends: libwbclient0 (= 2:4.7.6+dfsg~ubuntu-0ubuntu2) but 2:4.7.6+dfsg~ubuntu-0ubuntu2.9 is installed
 samba-libs : Depends: libwbclient0 (= 2:4.7.6+dfsg~ubuntu-0ubuntu2) but 2:4.7.6+dfsg~ubuntu-0ubuntu2.9 is installed
The following actions will resolve these dependencies:

Keep the following packages at their current version:
1)     python-samba [Not Installed]                       
2)     samba [Not Installed]                              
3)     samba-common-bin [Not Installed]                   
4)     samba-dsdb-modules [Not Installed]                 
5)     samba-libs [Not Installed]                         
6)     samba-vfs-modules [Not Installed]                  

Leave the following dependencies unresolved:         
7)     samba recommends samba-dsdb-modules                
8)     samba-common recommends samba-common-bin           

    Accept this solution? [Y/n/q/?] n


The following actions will resolve these dependencies:

Downgrade the following packages:                                          
1)     libwbclient0 [2:4.7.6+dfsg~ubuntu-0ubuntu2.9 (now) -> 2:4.7.6+dfsg~ubuntu



    Accept this solution? [Y/n/q/?] y

The following packages will be DOWNGRADED:
  libwbclient0 
The following NEW packages will be installed:
  attr{a} ibverbs-providers{a} libcephfs2{a} libibverbs1{a} libldb1{a} 
  libnl-route-3-200{a} librados2{a} libtdb1{a} python-crypto{a} 
  python-dnspython{a} python-ldb{a} python-samba{a} python-tdb{a} samba 
  samba-common{a} samba-common-bin{a} samba-dsdb-modules{a} samba-libs{a} 
  samba-vfs-modules{a} tdb-tools{a} 
.......

    samba


[2019/07/11 12:31:24.139070,  0] ../lib/util/debug.c:1053(reopen_logs_internal)
  Unable to open new log file '/var/log/samba/log.%m': Permission denied
[2019/07/11 12:31:24.139119,  0] ../source4/smbd/server.c:448(binary_smbd_main)
  samba version 4.7.6-Ubuntu started.
  Copyright Andrew Tridgell and the Samba Team 1992-2017

решение3

Я решил это так:

sudo apt-get install libwbclient0=2:4.3.8+dfsg-0ubuntu1 &&
sudo apt-get install samba

решение4

То же самое произошло со мной на Ubuntu Server 16.04.1, но ни один из предыдущих ответов не помог мне. После многочасовых поисков решения я добился того, чтобы это заработало как надо:

sudo wget http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb
sudo dpkg -i python-support_1.0.15_all.deb

Затем выполните:

sudo apt-get install samba

Связанный контент