处理时遇到错误:libxau-dev:amd64

处理时遇到错误:libxau-dev:amd64

我已删除 Java 版本 1.8,现在想安装版本 1.7。我一直在error(1) with libxau-dev file尝试安装它,但收到以下消息:

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:~$ 

答案1

通过使用主服务器在评论中解决

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

相关内容