DelfinDelfin
Posts: 4
Joined: Sat Jan 02, 2016 11:55 am

Problem installing software: unmet dependencies

Sat Jan 02, 2016 11:59 am

Hi, I tried to install a lamp server on my raspberry pi. I think I did something wrong and now I can't install anything. Whenever I write "sudo apt-get install something", (for example "vim") I got the next mesagge:

Code: Select all


    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
    mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
    vim : Depends: vim-runtime (= 2:7.3.547-7) but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).




Do you have any ideas of how can I fix this problem? Thanks in advance. Sorry, I am new on this so I am sure that maybe is something too obvious, but I don't know how to fix it by myself.

User avatar
AndyD
Posts: 2337
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 12:05 pm

The error message is suggesting you run

Code: Select all

apt-get -f install
to correct the problem. Did you try that? Try:

Code: Select all

sudo apt-get -f install

DelfinDelfin
Posts: 4
Joined: Sat Jan 02, 2016 11:55 am

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 12:18 pm

yes, I did that, and I got the next:

Code: Select all

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  mysql-server-5.5
Suggested packages:
  tinyca
The following NEW packages will be installed:
  mysql-server-5.5
0 upgraded, 1 newly installed, 0 to remove and 51 not upgraded.
13 not fully installed or removed.
Need to get 0 B/1,620 kB of archives.
After this operation, 30.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 82752 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.46-0+deb7u1_armhf.deb) ...
ERROR: There's not enough space in /var/lib/mysql/
dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.46-0+deb7u1_armhf.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.46-0+deb7u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't know why it says "There's not enough space in /var/lib/mysql/". I have an 8 gb sd card, and I haven't installed so many things yet

Mesdag
Posts: 5
Joined: Fri Jan 01, 2016 11:56 am

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 12:26 pm

I do not have an answer for this, but have a similar problem with apt-get, in case the problem and solution is related. Below is an example:
pi@raspberrypi:~ $ sudo apt-get install pyperclip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pyperclip
I've updated and upgraded both before and after doing the apt-get (and also tried the "apt-get -f" proposal, but got the same result. I have tried to install various packages and get same error with all. There are various other posts with problems that seem to be similar, but none that seem to have solutions to this (basic?) issue.

User avatar
buja
Posts: 626
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 12:26 pm

I suggest you check your disk space anyway with

Code: Select all

df -h
Last edited by buja on Sat Jan 02, 2016 12:48 pm, edited 1 time in total.

DelfinDelfin
Posts: 4
Joined: Sat Jan 02, 2016 11:55 am

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 12:41 pm

with "df -h":

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
rootfs          2.9G  2.9G     0 100% /
/dev/root       2.9G  2.9G     0 100% /
devtmpfs        460M     0  460M   0% /dev
tmpfs            93M  228K   93M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           186M     0  186M   0% /run/shm
/dev/mmcblk0p1   56M   19M   37M  34% /boot
tmpfs           186M     0  186M   0% /tmp

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 12:54 pm

It looks like you installed with NOOBS and did not expand your file system to fill the whole card; it says the size is 2.9G. In a terminal window, type

Code: Select all

sudo raspi-config
and choose the 'Expand Filesystem' option

User avatar
buja
Posts: 626
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 1:00 pm

It looks like you need to expand your SD card capacity. Right now the capacity is only 4 GB and it's full (use%=100%). That's a bit odd, but perfectly normal for a Pi.
Expanding the filesystem is easy with raspi-config:

Code: Select all

sudo raspi-config
Choose menu option 1 Expand Filesystem. The Pi will now resize the filesystem on the SD card to use the full SD card capacity (8 GB in your case). Exit raspi-config, reboot and try the df -h command again. It should now show 50% use and you can try to install whatever you want again.

DelfinDelfin
Posts: 4
Joined: Sat Jan 02, 2016 11:55 am

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 1:09 pm

it worked! Thanks a lot!

DirkS
Posts: 10788
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Problem installing software: unmet dependencies

Sat Jan 02, 2016 2:56 pm

Mesdag wrote:I do not have an answer for this, but have a similar problem with apt-get, in case the problem and solution is related
Your problem is not even remotely similar.
Your error message clearly states that there is no package 'pyperclip' in the repository.
Please do not hijack topics. It generally results in a big mess and there's a good chance you will not get your problem addressed.

Re your error: pyperclip cannot be installed with apt-get.
It is available on pypi so you should be able to install it with

Code: Select all

sudo pip install pyperclip
for python 2. For python 3 use

Code: Select all

sudo pip3 install pyperclip
You may have to install pip first:

Code: Select all

sudo apt-get update
sudo apt-get install python-pip
For python 3 you need

Code: Select all

sudo apt-get update
sudo apt-get install python3-pip

Mesdag
Posts: 5
Joined: Fri Jan 01, 2016 11:56 am

Re: Problem installing software: unmet dependencies

Sun Jan 03, 2016 10:54 am

Thanks DirkS. That solved my problem (of course you'll say ...). I'll keep your advice about topics in mind. Best Mesdag

Return to “Troubleshooting”