• 11
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I came along this problem when i tried to install php5-curl on my Ubuntu 14.04. I ran: sudo apt-get install php5-curl and got:

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:
 cpp-4.9 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 g++-4.9 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 gcc-4.9 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libasan1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libatomic1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libcilkrts5 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libgcc-4.9-dev : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libgcc1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libgomp1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libitm1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 liblsan0 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libquadmath0 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libstdc++-4.9-dev : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libstdc++6 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libtsan0 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libubsan0 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 php5-curl : Depends: phpapi-20121212
             Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.14) but 5.6.13+dfsg-1+deb.sury.org~trusty+3 is to be installed
 E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

But when i run apt-get -f install I get a message that a lot off packages will be removed when i continue...:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  dbconfig-common gyp libauthen-pam-perl libc-ares-dev libc-ares2 libio-pty-perl libjs-node-uuid libopendkim9 librbl1 libunbound2 libvbr2 php-gettext
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  gcc-4.9-base libgcc1
The following packages will be REMOVED:
  apache2 apache2-bin apport apt apt-show-versions apt-transport-https apt-utils apt-xapian-index aptitude build-essential byobu clamav clamav-daemon
  clamav-freshclam clamsmtp command-not-found cpp cpp-4.9 g++ g++-4.8 g++-4.9 gcc gcc-4.8 gcc-4.9 gettext-base groff-base grub-common grub-gfxpayload-lists
  grub-pc grub-pc-bin grub2-common landscape-common language-selector-common libapache2-mod-php5 libapt-inst1.5 libapt-pkg-perl libapt-pkg4.12 libasan1
  libasprintf0c2 libatomic1 libboost-iostreams1.54.0 libboost-iostreams1.55.0 libcilkrts5 libclamav6 libcwidget3 libept1.4.12 libgcc-4.8-dev libgcc-4.9-dev
  libgmp-dev libgmpxx4ldbl libgomp1 libicu52 libitm1 libllvm3.5 liblsan0 liblua5.1-0 libmemcached10 libmemcached11 libopendbx1 libopendbx1-sqlite3
  libquadmath0 libsigc++-2.0-0c2a libstdc++-4.8-dev libstdc++-4.9-dev libstdc++6 libtsan0 libubsan0 libv8-3.14-dev libv8-3.14.5 libxapian22 lshw man-db
  mysql-server mysql-server-5.5 mysql-server-core-5.5 node-abbrev node-ansi node-ansi-color-table node-archy node-async node-block-stream
  node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fstream node-fstream-ignore node-github-url-from-git
  node-glob node-graceful-fs node-gyp node-inherits node-ini node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp
  node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read node-read-package-json
  node-request node-retry node-rimraf node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent node-underscore node-which nodejs nodejs-dev
  npm opendkim opendkim-tools php5 php5-intl phpmyadmin pppoeconf python-apt python-xapian python3-apport python3-apt python3-commandnotfound
  python3-distupgrade python3-software-properties python3-update-manager re2c ruby-dev ruby-full ruby2.1-dev sa-compile tasksel tasksel-data telnet
  thermald ubuntu-minimal ubuntu-release-upgrader-core ubuntu-standard unattended-upgrades update-manager-core update-notifier-common webmin
The following NEW packages will be installed:
  gcc-4.9-base
The following packages will be upgraded:
  libgcc1
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt libapt-pkg4.12 (due to apt) libstdc++6 (due to apt)
1 upgraded, 1 newly installed, 154 to remove and 0 not upgraded.
Need to get 54.3 kB of archives.
After this operation, 543 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

I guess that's not ok to remove them... This is in my /etc/apt/sources.list:

###### Ubuntu Main Repos
deb http://nl.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://nl.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://nl.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://nl.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://nl.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://nl.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

What could be causing those dependency errors?

I hope you could help me out. If you need more info, just ask.

Thanks in advance!

      • 2
    • Something is terribly wrong, either with your system or the Ubuntu repositories. The version of gcc that it is trying to install is from utopic, which of course is end of life and can no longer be installed via normal means.
      • 2
    • I guess it's my system :p and i've no clue what caused it. but is there no way to fix this or something else what can cause this problem?
      • 1
    • Your sources list doesn't match the packages which were attempted to be installed. First run apt-get update and apt-get dist-upgrade. Then continue.
      • 1
    • Thanks for the reply. I've done as you suggested, but with apt-get dist-upgrade i get the same results: ... Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not installed. When i use apt-get dist-upgrade -f (with the -f flag) i also get the same results as with apt-get -f install. Do i have to change the sources list?

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags