0

I have removed Java version 1.8 and now want to install version 1.7. All the time I am getting error(1) with libxau-dev file so I am trying to install it and getting message below:

my@server:~$ sudo apt-get install libxau-dev
sudo: unable to resolve host server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libxau-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  icc-profiles-free java-wrappers libapache-pom-java
  libatinject-jsr330-api-java libavalon-framework-java libbcprov-java
  libbsf-java libcofoja-java libcommons-codec-java libcommons-io-java
  libcommons-logging-java libcommons-math-java libcommons-net1-java
  libcommons-parent-java libguava-java libhamcrest-java libhdf5-8
  libhttpclient-java libhttpcore-java libjama-java libjargs-java
  libjaxp1.3-java libjcommon-java libjfreechart-java libjgraph-java
  libjgrapht0.8-java libjhdf5-java libjhdf5-jni libjide-oss-java
  libjlibeps-java libjline-java libjsr305-java liblog4j1.2-java liboro-java
  librhino-java libsam-java libsaxon-java libswing-layout-java libx11-doc
  libxalan2-java libxdmcp-dev libxerces2-java libxml-commons-external-java
  libxml-commons-resolver1.1-java libxmlgraphics-commons-java
  x11proto-input-dev x11proto-kb-dev xtrans-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 11.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu/ vivid/main libxau-dev amd64 1:1.0.8-1 [11.1 kB]
Fetched 11.1 kB in 9s (1,137 B/s)                                              
dpkg: error processing package libxau-dev:amd64 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 libxau-dev:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
my@server:~$ 
12
  • have you tried sudo apt-get upgrade
    – Ravan
    Sep 23, 2015 at 8:23
  • 1
    Start sudo apt-get clean; sudo apt-get purge libxau-dev; sudo apt-get install libxau-dev
    – A.B.
    Sep 23, 2015 at 8:30
  • I tried upgrade, clean, purge, remove commands and I still gets this msg: dpkg: error processing package libxau-dev:amd64 (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration Errors were encountered while processing: libxau-dev:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)
    – Sunil
    Sep 23, 2015 at 10:27
  • Use the main server via sudo sed -i 's/http:\/\/in/http:\/\//' /etc/apt/sources.list; sudo apt-get update and try it again: sudo apt-get clean; sudo apt-get purge libxau-dev; sudo apt-get install libxau-dev
    – A.B.
    Sep 23, 2015 at 11:07
  • Sorry Sir, I still got the msg --> my@server:~$ sudo sed -i 's/http:\/\/in/http:\/\//' /etc/apt/sources.list sudo: unable to resolve host server my@server:~$
    – Sunil
    Sep 23, 2015 at 12:18

1 Answer 1

0

Solved in the comments by using the mainserver via

sudo sed -i 's/http:\/\/in\./http:\/\//' /etc/apt/sources.list
sudo apt-get update
sudo apt-get clean
sudo apt-get purge libxau-dev
sudo apt-get install libxau-dev

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .