Score:0

Apache Ambari install problem

sd flag

I'm trying to install Ambari from Apache BigTop repo, but I'm getting error regarding python dependency:

vagrant@vagrant:~$ sudo apt install ambari\*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'ambari-server' for glob 'ambari*'
Note, selecting 'ambari-agent' for glob 'ambari*'
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:
 ambari-agent : Depends: python (>= 2.6) but it is not installable
 ambari-server : Depends: python (>= 2.6) but it is not installable
E: Unable to correct problems, you have held broken packages.

Checking python:

vagrant@vagrant:~$ python --version
Python 2.7.18
vagrant@vagrant:~$ apt-cache policy python
python:
  Installed: (none)
  Candidate: (none)
  Version table:
vagrant@vagrant:~$ sudo update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).

  Selection    Path              Priority   Status
---------------------------------------------
  0            /usr/bin/python3   2         auto mode
* 1            /usr/bin/python2   1         manual mode
  2            /usr/bin/python3   2         manual mode
vagrant@vagrant:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

What am I doing wrong?

Thanks!

pl flag
`dpkg -l python2.7`? Do you have python installed from the Ubuntu repo? Because that's what `apt` will be looking for - the package specifically - not the python binary in the path.
Boris Bahes avatar
sd flag
`vagrant@vagrant:~$ dpkg -l python2.7 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-==================-============-============================================================= ii python2.7 2.7.18-13ubuntu1.1 amd64 Interactive high-level object-oriented language (version 2.7)`
pl flag
Are you inside some kind of vagrant environment? Can you install the debs outside of that environment, if so?
Boris Bahes avatar
sd flag
Yes this is vagrant VM. I tried also installing VM using images directly from ubuntu, still the same.
Score:0
ly flag

I had the same problem deploying Ambari (2.7.5) packaged by Bigtop (3.2.0) on Ubuntu 22.04. The problem is that Ubuntu 22.04 doesn't has the python (>= 2.6.0) package. You must to use the python2 (>= 2.7) package insted. To change this package, open file bigtop-packages/src/deb/ambari/control file in Bigtop Ambari project and change python (>= 2.6.0) to python2 (>= 2.7). This must be done in bigtop-ambari-mpack project too. After that, rebuild your packages and pack they again before test a new deploy. Remember that you could has problems with python incompatibilities between version 2.6 to 2.7. I have not yet tested this issues.

The new control file will been like this:

Source: ambari
Section: misc
Priority: extra
Maintainer: Bigtop <[email protected]>
Build-Depends: debhelper (>= 6)
Standards-Version: 3.8.0
Homepage: http://ambari.apache.org/

Package: ambari-server
Architecture: all
Depends: openssl, postgresql (>= 8.1), python2 (>= 2.7), curl
Description: Ambari Server 

Package: ambari-agent
Architecture: all
Depends: openssl, python2 (>= 2.7), curl
Description: Ambari Agent 

Maybe the answer been late. But i hope that this could help others with this problem.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.