LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   Please help me to solve sudo apt-get upgrade error (https://www.linuxquestions.org/questions/linux-mint-84/please-help-me-to-solve-sudo-apt-get-upgrade-error-4175624600/)

sumit_48 02-27-2018 10:33 PM

Please help me to solve sudo apt-get upgrade error
 
I am not able to open software centre or any system setting in Linux mint. I have tried all the suggestions posted by experts but none of them is working. While running "sudo apt-get upgrade" or installing any aother software am getting this:
Code:

sumit@sumit ~ $ sudo apt-get upgrade
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:
 python : PreDepends: python-minimal (= 2.7.11-1) but 2.7.12-1~16.04 is installed
          Depends: libpython-stdlib (= 2.7.11-1) but 2.7.12-1~16.04 is installed
E: Unmet dependencies. Try using -f.


Ztcoracat 02-28-2018 01:05 AM

Hi: & Welcome to LQ.

I'm assuming you're running Ubuntu 16.04:-

To fix the problem you need to run:

Code:

sudo apt-get -f install
Those umet dependencies won't go away you will need to satisfy them. The -f means to force.

What are you trying to install?

sumit_48 02-28-2018 01:28 AM

I am using Mint. At first I was trying to install gnuplot, but later I found that am facing same problem with almost every installation.This is what am getting:
Code:

sumit@sumit ~ $ sudo apt-get -f install
[sudo] password for sumit:
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  python
Suggested packages:
  python-doc python-tk
The following packages will be upgraded:
  python
1 upgraded, 0 newly installed, 0 to remove and 181 not upgraded.
1 not fully installed or removed.
Need to get 0 B/137 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up python-minimal (2.7.12-1~16.04) ...
Bus error (core dumped)
dpkg: error processing package python-minimal (--configure):
 subprocess installed post-installation script returned error exit status 135
Errors were encountered while processing:
 python-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

My Gnuplot installation error is as following:
Code:

sumit@sumit ~ $ sudo apt-get install gnuplot
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:
 gnuplot : Depends: gnuplot5-qt but it is not going to be installed or
                    gnuplot5-x11 but it is not going to be installed or
                    gnuplot5-nox
 python : PreDepends: python-minimal (= 2.7.11-1) but 2.7.12-1~16.04 is to be installed
          Depends: libpython-stdlib (= 2.7.11-1) but 2.7.12-1~16.04 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


descendant_command 02-28-2018 01:59 AM

Been messing about with your sources.list?
Your python package is out of sync with it's dependencies.

sumit_48 02-28-2018 02:06 AM

I had installed the XCrysDen software and it replaced the original bashrc file. I restored it but since then am facing this issue. Please tell me how can I fix this?

pan64 02-28-2018 02:22 AM

That bus error message is not a good sign.
How did you install XcrySDen (exactly)?

sumit_48 02-28-2018 02:25 AM

I have downloaded the package from the home site and then run the configuration file.

pan64 02-28-2018 02:32 AM

this is not an exact description. What did you download exactly? How did you run which configuration file. But the most important: did you make it as root or as regular user?

sumit_48 02-28-2018 02:57 AM

This is the content of XCrysDen configuration file. I run this executable only to install the XCrysden.

Code:

#!/bin/sh

InstallError () {
    echo "
*************************************************
An ERROR occured during configuration of XCrySDen

Code: $1
Exit 1
"
    exit 1
}

#
# Usage: xcConfigure [topdir]
#

if test "$#" -lt 1 ; then
    XCRYSDEN_TOPDIR=`pwd`
    if test \( "$0" != "./xcConfigure.sh" \) -a \( "$0" != "./xcConfigure" \)
    then
        echo "
    Please goto XCrySDen toplevel (root) directory and execute the xcConfigure
    as \"./xcConfigure\" or from any other place as \"xcConfigure topdir\"
"
    exit 1
    fi
else
    if test -d "$1" ; then
        XCRYSDEN_TOPDIR=$1
    else
        InstallError "XCRYSDEN_TOPDIR $1 does not exists"
    fi
fi

# check if XCRYSDEN_TOPDIR exists:
xcv=`env | grep XCRYSDEN_TOPDIR`

cd $XCRYSDEN_TOPDIR

#
# assuming user shell is csh or tcsh or sh
#

if test "`echo -n a`" = "-n a" ; then
    ECHO_n=echo
else
    ECHO_n="echo -n"
fi


if [ \( -d /tmp \) -a \( -w /tmp \) ]; then
    tempdir=/tmp
else
    # set tempdir to $HOME
    tempdir=$HOME
fi

CLEAR=$XCRYSDEN_TOPDIR/scripts/dummy.sh
MORE="cat -"
type clear > $tempdir/install.$$ 2>&1
if test "$?" -eq 0 ; then CLEAR=clear; fi
type more > $tempdir/install.$$ 2>&1
if test "$?" -eq 0 ; then MORE=more; fi

rm -f $tempdir/install.$$

date=`date`
export XCRYSDEN_TOPDIR
. $XCRYSDEN_TOPDIR/sys_utils/xcConfigure_updateProfile.sh
. $XCRYSDEN_TOPDIR/sys_utils/xcConfigure_definitions.sh

rm -f $tempdir/xcInstall-sh.$$ $tempdir/xcInstall-csh.$$;


ON running the file it gives following

Code:

  ========================================================================

      * * * *      XCRYSDEN's Configuration/Setup Utility      * * * *

  ------------------------------------------------------------------------

                          XCRYSDEN version: 1.5.21

      PLEASE FOLLOW INSTRUCTIONS DURING THE CONFIGURATION PROCEDURE !!!
  =========================================================================
 
  Press <Enter> to continue ...


  Please specify XCRYSDEN_SCRATCH directory (default: /home/sumit/xcrys_tmp):

 Updating profile file /home/sumit/.bashrc ... OK

  The following record was inserted into /home/sumit/.bashrc:


#------------------------------------------------------------------------
# this is for XCRYSDEN 1.5.21; added by XCRYSDEN installation on
# Wed Feb 28 14:23:22 IST 2018
#------------------------------------------------------------------------
XCRYSDEN_TOPDIR=/home/sumit/Software/XCrySDen
XCRYSDEN_SCRATCH=/home/sumit/xcrys_tmp
export XCRYSDEN_TOPDIR XCRYSDEN_SCRATCH
PATH="$XCRYSDEN_TOPDIR:$PATH:$XCRYSDEN_TOPDIR/scripts:$XCRYSDEN_TOPDIR/util"


  I am about to create the $HOME/.xcrysden/custom-definitions file,
  which is XCRYSDEN's customization file.

  Press <Enter> to continue ...
 Answer the following question(s) please:
  ----------------------------------------

  CRYSTAL is an electronic structure program for periodic systems.
  (http://www.crystal.unito.it/)

  Do you have a CRYSTAL package ([y]es/[n]o): n
backing-up existing custom-definitions file to /home/sumit/.xcrysden/custom-definitions.1
 
  creating new /home/sumit/.xcrysden/custom-definitions file ... OK

  Press <Enter> to continue ...
Would you like to add xcrysden icon to the desktop ([y]es/[n]o): y
 
  creating xcrysden dekstop icon via /home/sumit/Desktop/xcrysden.desktop file ... OK


  XCRYSDEN uses a few external utility programs. These are the following:

  1.) the "Open Babel" program is needed to display molecular structure from
      Gaussian Z-matrix file.

  2.) the ImageMagick's suit of programs is used to print-to-file (PNG/JPG/GIF/...),
      to create animated-GIFs, and to screen dump windows.

  3.) the "Mplayer's mencoder" program is used to create AVI/MPEG movies
      from the animation snapshots.

  4.) xcrysden may also use other programs such as gifsicle, xwd, ppmtompeg, ...

  Links
  --
  Open BABEL:  http://openbabel.org/
  IMAGEMAGICK: http://www.imagemagick.org/
  MENCODER:    http://www.mplayerhq.hu/

  Press <Enter> to continue ...
 Please report BUGS to Tone.Kokalj@ijs.si.

  TERMS OF USE:
  -------------
  XCRYSDEN is released under the GNU General Public License.
 
  Whenever graphics generated by XCrySDen are used in scientific
  publications, it shall be greatly appreciated to include an
  explicit reference. The preferred form is the following:

  [ref] A. Kokalj, Comp. Mater. Sci., Vol. 28, p. 155, 2003.
        Code available from http://www.xcrysden.org/.
 
     
  XCRYSDEN tips:
                  - try: xcrysden --help

                  - occasionally clean the xcrysden scratch directory
                    (you can use the "xc_cleanscratch" utility)

  Press <Enter> to continue ...

FINAL NOTICE: before running xcrysden please load (source) your profile, i.e.:

  - for bash:          source ~/.bashrc
  - for csh or tcsh:    source ~/.cshrc
  - for sh:            . ~/.profile

Then type: xcrysden


pan64 02-28-2018 03:26 AM

so you did not execute it as root (as far as I see). In that case it is not related to the apt-get install -f problem.
But obviously you need to solve that.
which version of mint do you have? How /etc/apt/sources.list is set?

sumit_48 02-28-2018 03:36 AM

Code:

RELEASE=18.3
CODENAME=sylvia
EDITION="Cinnamon 64-bit"
DESCRIPTION="Linux Mint 18.3 Sylvia"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_sylvia_cinnamon_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_sylvia_cinnamon.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 18.3 Cinnamon 64-bit

There is no source.list at /etc/apt/. However apt contains following folder and file
Code:

sumit@sumit ~ $ ls /etc/apt
apt.conf.d  preferences.d  sources.list.d  trusted.gpg  trusted.gpg~  trusted.gpg.d

All *.d are directory and source.list.d contains following files:
Code:

sumit@sumit ~ $ ls /etc/apt/sources.list.d/
google-chrome.list  graphics-drivers-ppa-xenial.list  official-package-repositories.list


pan64 02-28-2018 03:38 AM

ok, try the following:
Code:

# as root
apt-get update
apt-get upgrade
apt-get install -f

and post the full output

descendant_command 02-28-2018 03:42 AM

and output of:
Code:

apt-cache policy python python-minimal

sumit_48 02-28-2018 03:42 AM

Code:

sumit ~ # sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease                                                                                                         
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                   
Hit:4 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease                                                               
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                                                                   
Hit:6 http://archive.canonical.com/ubuntu xenial InRelease                                                                                 
Hit:7 http://dl.google.com/linux/chrome/deb stable Release                                                                                 
Ign:8 http://packages.linuxmint.com sylvia InRelease                                                   
Get:9 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]                             
Hit:10 http://packages.linuxmint.com sylvia Release                                                     
Fetched 306 kB in 2s (119 kB/s)                 
Reading package lists... Done

Code:

sumit ~ # sudo apt-get upgrade
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:
 python : PreDepends: python-minimal (= 2.7.11-1) but 2.7.12-1~16.04 is installed
          Depends: libpython-stdlib (= 2.7.11-1) but 2.7.12-1~16.04 is installed
E: Unmet dependencies. Try using -f.

Code:

sumit ~ # sudo apt-get install -f
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  python
Suggested packages:
  python-doc python-tk
The following packages will be upgraded:
  python
1 upgraded, 0 newly installed, 0 to remove and 181 not upgraded.
1 not fully installed or removed.
Need to get 0 B/137 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up python-minimal (2.7.12-1~16.04) ...
Bus error (core dumped)
dpkg: error processing package python-minimal (--configure):
 subprocess installed post-installation script returned error exit status 135
Errors were encountered while processing:
 python-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code:

sumit ~ # apt-cache policy python python-minimal
python:
  Installed: 2.7.11-1
  Candidate: 2.7.12-1~16.04
  Version table:
    2.7.12-1~16.04 1001
      1001 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
 *** 2.7.11-1 1001
      1001 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
python-minimal:
  Installed: 2.7.12-1~16.04
  Candidate: 2.7.12-1~16.04
  Version table:
 *** 2.7.12-1~16.04 1001
      1001 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
    2.7.11-1 1001
      1001 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages


pan64 02-28-2018 04:34 AM

looks like it is a conflict because of libpython-stdlib (at least I think so).
I would try:
Code:

apt-get install python-minimal=2.7.11-1


All times are GMT -5. The time now is 09:48 PM.