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
  • 459
  • 1
  • 7
  • 28

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.