0

I tried installing LAMP following this tutorial: https://help.ubuntu.com/community/ApacheMySQLPHP

the first command was: $ sudo apt-get install lamp-server^

Which gave me these errors:

enter image description here

I tried installing apache2 separetly but I still get the first error for apache2-bin.

I tried following these steps too: https://stackoverflow.com/questions/18947426/apt-get-conflict-in-ubuntu without any success.

EDIT:

Trying to install SSH server following this website: http://www.htpcbeginner.com/install-ssh-server-on-ubuntu-1204/

first command output for this: sudo apt-get install openssh-server:

enter image description here

EDIT #2:

Output for: uname -a; lsb-release -a; libck-connector0; sudo apt-get install libck-connector0

enter image description here

EDIT #3:

for susspicious outpust:

sudo apt-get install libck-connector0

enter image description here

and: apt-get update; apt-cache policy libck-connector0

enter image description here

EDIT #4:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192; apt-get update

enter image description here

Kar19
  • 461
  • 1
  • 6
  • 27
  • What version of Ubuntu are you using? – the_velour_fog Nov 23 '15 at 13:44
  • @user4668401 the first one here: http://www.ubuntu.com/download/server

    Ubuntu Server 14.04.3 LTS

    – Kar19 Nov 23 '15 at 13:52
  • The headachey part about diagnosing these is that you'll have to try and install each package one by one until you find out which packages in the entire reverse dependencies chain are a problem. – Thomas Ward Nov 23 '15 at 13:57
  • Install and start SSH on your server. After that, login from your host machine and run the installation of the task lamp-server again: sudo apt-get install lamp-server^ Now copy the output and paste to your question and remove the screenshot. Next run uname -a; lsb-release -a; apt-cache policy apache2-bin lipapr1 and add talso this output to your question. – A.B. Nov 23 '15 at 13:57
  • @A.B. Indeed, but the headache is that if you don't know why something's not installing you have to go through the entire chain ;) – Thomas Ward Nov 23 '15 at 13:59
  • @A.B. I edited my main post with a new error output for installing the SSH Server thing. – Kar19 Nov 23 '15 at 14:02
  • Please take in mind that this is my first install on a virtualbox so it maybe with the virtualbox and not the ubuntu itself. Just saying,,, keep open minded for that as a problem too... – Kar19 Nov 23 '15 at 14:05
  • There is nothing wrong with your VirtualBox. [Edit] your question and add the output of uname -a; lsb-release -a; libck-connector0; sudo apt-get install libck-connector0 – A.B. Nov 23 '15 at 14:39
  • apt-get update; apt-cache policy libck-connector0 – A.B. Nov 23 '15 at 14:49
  • edited the mian post with outputs – Kar19 Nov 23 '15 at 14:53
  • apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192; apt-get update – A.B. Nov 23 '15 at 14:56
  • I edited the main post with the last output – Kar19 Nov 23 '15 at 15:44

3 Answers3

0

Ok, let's try something else:

  • I see that at one point you had information, that you have held some packages, try to run dpkg --get-selections | grep hold to see those packages (they may be blocking other packages from being installed); if the list is empty, then proceed to the next point, if not, you can try to uninstall/purge some of those packages by hand
  • if above does not help, try apt-get -f install - which should force finish any pending changes - if it uninstalls/installs any packages, run apt-get update and/or remove repo information and then try to install LAMP
  • you can also try apt-get autoremove, but I've never seen such problems caused by unused packages, but who knows

Also found this to clean held packages:

  • show held packages

apt-mark showhold

  • un-hold them by

sudo apt-mark unhold [package name]

Source: E: Unable to correct problems, you have held broken packages

-1

It seems that this instructions are for some older version of Ubuntu.

Try:

sudo apt-get update 
sudo apt-get install apache2 mysql-client mysql-server php5 libapache2-mod-php5

You will be asked for all necessary passwords during installation process. Apache and MySQL will be started automatically and addedd to start at boot. I'd also recommend installing phpmyadmin for database operations.

-1

Its possible that the repositories from where you are trying to install from have changed since your iso image was created.
Try running these commands:

rm -rf /var/lib/apt/lists/*

This will remove the package lists. No repositories will be deleted, they are configured in the config file in /etc/apt/sources.list. All that can happen is that tools like apt-cache cannot get package information unless you updated the package lists. Also apt-get install will fail with E: Unable to locate package <package>, because no information is available about the package.

Then

apt-get clean 

apt-get clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.

finally

apt-get update

to rewrite those lists.