直到我再次与控制台交互,Bash 提示才会打印

直到我再次与控制台交互,Bash 提示才会打印

我甚至不知道从哪里开始诊断这个问题。通常,当一个命令完成时,提示符会打印出下一个命令。然而,这并没有发生。很难用语言解释,我只能举一个例子:

User@Machine:~$ cp /mnt/mountname/directory/textfile.txt .

等待几秒钟后(对于小文件来说,这个操作的时间太长了),我按下Enter,然后看到:

User@Machine:~$ cp /mnt/mountname/directory/textfile.txt .
User@Machine:~$
User@Machine:~$

显然操作已完成,但提示未显示...直到我按下回车键,然后两个提示才立即显示出来。

这基本上似乎只是整体上的滞后问题。无法真正预测导致它的原因。我尝试升级到 12.04.3(3.8 内核,lts-raring),但没有帮助。

更新:刚才我fgrep在一个大型文本文件上执行了命令,结果返回正确。但之后我ls立即输入了内容,结果什么也没打印出来,直到我再次按下回车键。这种行为似乎比其他任何事情都更不一致。

更新2:有时候我觉得删除了一些软件包。我dpkg --get-selected与 12.04 清单进行了比较;以下是未安装的软件包。缺少其中任何一个软件包是否会导致问题?

activity-log-manager-common
activity-log-manager-control-center
appmenu-gtk3
appmenu-qt
apt-clone
archdetect-deb
brasero-cdrkit
colord
cryptsetup
cryptsetup-bin
dmraid
duplicity
ecryptfs-utils
enchant
firefox-locale-es
firefox-locale-zh-hans
folks-common
fonts-nanum
geoclue
geoclue-ubuntu-geoip
gir1.2-dbusmenu-gtk-0.4
gir1.2-ubuntuoneui-3.0
gnome-online-accounts
gwibber-service-facebook
gwibber-service-identica
gwibber-service-twitter
hplip
ibus-pinyin
ibus-pinyin-db-android
indicator-appmenu
indicator-datetime
indicator-power
indicator-printers
indicator-status-provider-mc5
keyutils
kpartx
kpartx-boot
krb5-locales
landscape-client-ui-install
language-pack-es
language-pack-es-base
language-pack-gnome-es-base
language-pack-gnome-zh-hans
language-pack-gnome-zh-hans-base
language-pack-zh-hans
language-pack-zh-hans-base
libdebconfclient0
libdebian-installer4
libfile-mimeinfo-perl
libfreerdp-plugins-standard
libfreerdp1
libgphoto2-l10n
libmtp-runtime
liboverlay-scrollbar3-0.2-0
libpam-cap
libqt4-sql-sqlite
libreoffice-style-tango
libsane-hpaio
libsnmp15
overlay-scrollbar
printer-driver-c2esp
printer-driver-gutenprint
printer-driver-hpcups
printer-driver-hpijs
printer-driver-postscript-hp
printer-driver-ptouch
printer-driver-sag-gdi
python-dateutil
python-libproxy
python-packagekit
python-reportlab-accel
python-ubuntuone-control-panel
python-zeitgeist
qt-at-spi
remmina-common
remmina-plugin-rdp
remmina-plugin-vnc
rhythmbox-mozilla
rhythmbox-plugin-magnatune
rhythmbox-plugin-zeitgeist
sessioninstaller
sni-qt
telepathy-indicator
thunderbird
thunderbird-globalmenu
thunderbird-gnome-support
ubiquity-frontend-gtk
ubiquity-slideshow-ubuntu
ubiquity-ubuntu-artwork
ubuntuone-control-panel
ubuntuone-couch
ubuntuone-installer
unity-lens-applications
unity-lens-files
unity-lens-music
unity-lens-video
unity-scope-musicstores
unity-scope-video-remote
usb-modeswitch
usb-modeswitch-data
user-setup
xfsprogs
zeitgeist
zeitgeist-core
zeitgeist-datahub

更新 3:回复评论,输出$ sudo dpkg -l | grep -e "iU" -e "rc"

ii  apt-xapian-index                              0.44ubuntu5.1                                       maintenance and search tools for a Xapian index of Debian packages
rc  bugzilla3                                     3.2.5.1-2                                           web-based bug tracking system
rc  capplets-data                                 1:2.30.1-0ubuntu2                                   configuration applets for GNOME - data files
ii  cpio                                          2.11-7ubuntu3                                       GNU cpio -- a program to manage archives of files
rc  cups-driver-gutenprint                        5.2.5-0ubuntu1.1                                    printer drivers for CUPS
rc  esound-clients                                0.2.41-6ubuntu1                                     Enlightened Sound Daemon - clients
ii  evolution-common                              3.2.3-0ubuntu6                                      architecture independent files for Evolution
ii  evolution-data-server-common                  3.2.3-0ubuntu7.1                                    architecture independent files for Evolution Data Server
ii  file-roller                                   3.4.1-0ubuntu1                                      archive manager for GNOME
rc  gdm-guest-session                             0.15ubuntu0.1                                       gdm extension for guest session
ii  gir1.2-gtksource-3.0                          3.4.2-0ubuntu1                                      gir files for the GTK+ syntax highlighting widget
rc  gnome-games-common                            1:2.30.0-0ubuntu6                                   Common files for GNOME Games
rc  gnome-mahjongg                                1:2.30.0-0ubuntu6                                   Mahjongg tile solitaire game
ii  gnome-orca                                    3.4.2-0ubuntu0.1                                    Scriptable screen reader
ii  gnome-search-tool                             3.4.0-1                                             GNOME tool to search files
ii  gnome-system-monitor                          3.4.1-0ubuntu1                                      Process viewer and system resource monitor for GNOME
ii  gs-cjk-resource                               1.20100103-3                                        Resource files for gs-cjk, ghostscript CJK-TrueType extension
ii  gstreamer0.10-gconf                           0.10.31-1ubuntu1.2                                  GStreamer plugin for getting the sink/source information from GConf
ii  gwibber                                       3.4.2-0ubuntu2.3                                    Open source social networking client for GNOME
ii  gwibber-service                               3.4.2-0ubuntu2.3                                    Open source social networking client for GNOME
rc  hplip                                         3.10.2-2ubuntu2.2                                   HP Linux Printing and Imaging System (HPLIP)
rc  irb1.8                                        1.8.7.249-2ubuntu0.2                                Interactive Ruby (for Ruby 1.8)
ii  libarchive1                                   2.8.0-2ubuntu0.1                                    Single library to read/write tar, cpio, pax, zip, iso9660, etc.
ii  libarchive12                                  3.0.3-6ubuntu1                                      Multi-format archive and compression library (shared library)
ii  libaudiofile0                                 0.2.6-8ubuntu1                                      Open-source version of SGI's audiofile library
ii  libaudiofile1                                 0.3.3-2                                             Open-source version of SGI's audiofile library
rc  libbrasero-media0                             2.30.2-0ubuntu1.1                                   CD/DVD burning library for GNOME - runtime
ii  libclass-isa-perl                             0.36-3                                              report the search path for a class's ISA tree
rc  libdrm-nouveau1                               2.4.18-1ubuntu3                                     Userspace interface to nouveau-specific kernel DRM services -- runtime
rc  libept0                                       0.5.30                                              High-level library for managing Debian package information
ii  libffi6                                       3.0.11~rc1-5                                        Foreign Function Interface library runtime
ii  libgd2-xpm                                    2.0.36~rc1~dfsg-6ubuntu2                            GD Graphics Library version 2
rc  libgl1-mesa-dri                               9.0-0ubuntu1                                        free implementation of the OpenGL API -- DRI modules
rc  libgl1-mesa-glx                               9.0-0ubuntu1                                        free implementation of the OpenGL API -- GLX runtime
rc  libglapi-mesa                                 9.0-0ubuntu1                                        free implementation of the GL API -- shared library
rc  libgraphviz4                                  2.20.2-8ubuntu3                                     rich set of graph drawing tools
rc  libgstfarsight0.10-0                          0.0.17-2ubuntu2                                     Audio/Video communications framework: core library
ii  libgtksourceview-3.0-0                        3.4.2-0ubuntu1                                      shared libraries for the GTK+ syntax highlighting widget
ii  libgtksourceview-3.0-common                   3.4.2-0ubuntu1                                      common files for the GTK+ syntax highlighting widget
ii  libgtksourceview2.0-0                         2.10.5-0ubuntu3                                     shared libraries for the GTK+ syntax highlighting widget
ii  libgtksourceview2.0-common                    2.10.5-0ubuntu3                                     common files for the GTK+ syntax highlighting widget
rc  libgvfscommon0                                1.6.1-0ubuntu1build1                                userspace virtual filesystem - library
rc  libhpmud0                                     3.10.2-2ubuntu2.2                                   HP Multi-Point Transport Driver (hpmud) run-time libraries
ii  libkpathsea5                                  2009-11ubuntu2                                      TeX Live: path search library for TeX (runtime part)
ii  liblircclient0                                0.9.0-0ubuntu1                                      infra-red remote control support - client library
rc  libllvm3.1                                    3.1-2ubuntu1~12.04.1                                Low-Level Virtual Machine (LLVM), runtime library
rc  libmtp8                                       1.0.2-1ubuntu1                                      Media Transfer Protocol (MTP) library
rc  libnm-glib2                                   0.8-0ubuntu3.3                                      network management framework (GLib shared library)
rc  libntfs-3g75                                  1:2010.3.6-1ubuntu1                                 ntfs-3g filesystem in userspace (FUSE) library
ii  libnuma1                                      2.0.8~rc3-1                                         Libraries for controlling NUMA policy
rc  libodbcinstq1c2                               2.2.11-21                                           Qt-based ODBC configuration library
ii  liborc-0.4-0                                  1:0.4.16-1ubuntu2                                   Library of Optimized Inner Loops Runtime Compiler
rc  libpanel-applet2-0                            1:2.30.2-0ubuntu0.2                                 library for GNOME Panel applets
rc  libpolkit-gtk-1-0                             0.96-2ubuntu2                                       PolicyKit GTK+ API
rc  libpulse-browse0                              1:0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14     PulseAudio client libraries (zeroconf support)
ii  librdf0                                       1.0.14-1                                            Redland Resource Description Framework (RDF) library
ii  libreoffice-common                            1:3.5.7-0ubuntu4                                    office productivity suite -- arch-independent files
ii  libreoffice-core                              1:3.5.7-0ubuntu4                                    office productivity suite -- arch-dependent files
rc  librpm0                                       4.7.2-1lbuild1                                      RPM shared library
rc  librpmbuild0                                  4.7.2-1lbuild1                                      RPM build shared library
rc  librpmio0                                     4.7.2-1lbuild1                                      RPM IO shared library
rc  libsdl1.2debian-pulseaudio                    1.2.14-4ubuntu1.1                                   Simple DirectMedia Layer (with X11 and PulseAudio options)
rc  libsnmp15                                     5.4.2.1~dfsg0ubuntu1-0ubuntu2.2                     SNMP (Simple Network Management Protocol) library
ii  libspeex1                                     1.2~rc1-3ubuntu2                                    The Speex codec runtime library
ii  libspeexdsp1                                  1.2~rc1-3ubuntu2                                    The Speex extended runtime library
ii  libtalloc2                                    2.0.7-3                                             hierarchical pool based memory allocator
rc  libtelepathy-farsight0                        0.0.13-1                                            Glue library between telepathy and farsight2
rc  libturbojpeg                                  1.1.90+svn733-0ubuntu4.1                            IJG JPEG compliant runtime library.
ii  libusb-1.0-0                                  2:1.0.9~rc3-2ubuntu1                                userspace USB programming library
ii  libxapian15                                   1.0.18-1                                            Search engine library
ii  libxapian22                                   1.2.8-1                                             Search engine library
rc  libxatracker1                                 9.0-0ubuntu1                                        X acceleration library -- runtime
rc  libxen3                                       3.3.0-1ubuntu11                                     library interface for Xen, a Virtual Machine Monitor
ii  libxres1                                      2:1.0.5-1ubuntu0.1                                  X11 Resource extension library
ii  libxvidcore4                                  2:1.3.2-6                                           Open source MPEG-4 video codec (library)
ii  multiarch-support                             2.15-0ubuntu10.5                                    Transitional package to ensure multiarch compatibility
rc  mysql-server-5.1                              5.1.66-0ubuntu0.10.04.1                             MySQL database server binaries
rc  nvidia-304                                    304.88-0ubuntu0.0.3                                 NVIDIA binary Xorg driver, kernel module and VDPAU library
rc  nvidia-304-updates                            304.88-0ubuntu0.0.3                                 NVIDIA binary Xorg driver, kernel module and VDPAU library
rc  nvidia-experimental-304                       304.48-0ubuntu0.1                                   Experimental NVIDIA binary Xorg driver, kernel module and VDPAU library
rc  odbcinst1debian1                              2.2.11-21                                           Support library for accessing odbc ini files
ii  openjdk-7-jre-lib                             7u25-2.3.10-1ubuntu0.12.04.2                        OpenJDK Java runtime (architecture independent libraries)
ii  openoffice.org-common                         1:3.3.0-7ubuntu7                                    office productivity suite -- arch-independent files
rc  openoffice.org-core                           1:3.2.0-7ubuntu4.4                                  office productivity suite -- arch-dependent files
ii  pax                                           1:20120216-1                                        Portable Archive Interchange (cpio, pax, tar)
ii  php5-common                                   5.3.10-1ubuntu3.8                                   Common files for packages built from the php5 source
ii  python-gtksourceview2                         2.10.1-2build1                                      Python bindings for the GtkSourceView widget
ii  python-pkg-resources                          0.6.24-1ubuntu1                                     Package Discovery and Resource Access using pkg_resources
rc  python-ubuntuone                              0.3.1-0ubuntu1                                      Ubuntu One widget library
ii  python-xapian                                 1.2.8-1                                             Xapian search engine interface for Python
rc  rake                                          0.9.2.2-2                                           ruby make-like utility
rc  redmine                                       1.3.2+dfsg1-1ubuntu1                                flexible project management web application
rc  rhythmbox-ubuntuone-music-store               0.0.9-0ubuntu1                                      Ubuntu One Music Store Rhythmbox plugin
ii  rpm2cpio                                      4.9.1.1-1ubuntu0.2                                  tool to convert RPM package to CPIO archive
ii  smartdimmer                                   0.8b4+cvs20100914-1ubuntu2                          Change LCD brightness on Geforce cards
rc  speech-dispatcher                             0.7.1-6ubuntu3                                      Common interface to speech synthesizers
ii  sysv-rc                                       2.88dsf-13.10ubuntu11.1                             System-V-like runlevel change mechanism
ii  tar                                           1.26-4ubuntu1                                       GNU version of the tar archiving utility
ii  time                                          1.7-23.1                                            The GNU time program for measuring cpu resource usage
rc  tsclient                                      0.150-3ubuntu1                                      front-end for viewing of remote desktops in GNOME
ii  ubuntu-extras-keyring                         2010.09.27                                          GnuPG keys of the Ubuntu extras archive
ii  ubuntu-keyring                                2011.11.21.1                                        GnuPG keys of the Ubuntu archive
ii  unzip                                         6.0-4ubuntu2                                        De-archiver for .zip files
rc  virtualgl-libs                                2.3.2-1~preciseppa2                                 Library files for virtualgl
ii  xdg-utils                                     1.1.0~rc1-2ubuntu6                                  desktop integration utilities from freedesktop.org
ii  zip                                           3.0-4                                               Archiver for .zip files

答案1

我猜这是 gnome-terminal(我假设这是你正在使用的终端)或图形/桌面子系统中的一个错误,或者是它们之间的某种交互。是实际的键盘输入触发了缺失行的出现,还是向下滚动鼠标滚轮等操作触发了缺失行的出现?我以前在 gt 中见过类似的错误,我认为最后一个错误与切换或创建选项卡有关。

以前报告过的类似错误的示例:

https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/881014 https://bugzilla.redhat.com/show_bug.cgi?id=695412

我建议尝试使用不同的终端程序(例如 xterm),也许使用不同的窗口管理器或桌面环境(例如在 unity 和 unity-2d 之间切换)或图形驱动程序(例如在 nouveau 和 nvidia 专有驱动程序之间切换)。遗憾的是,实际上追踪 gnome-terminal 中的错误并修复它可能不太可能。

我非常怀疑丢失的包裹是原因。

答案2

你有一些残余结构应该删除。另外我建议你升级你的系统并重新配置更新的软件包。所以我希望你执行这些步骤一次,希望这对你有帮助。

  1. 首次开放软件来源为确保您能够顺利升级系统:

    • 在终端中执行sudo software-properties-gtk并转到更新选项卡。Tick前两个Check boxes,然后在同一个选项卡中Notify me of a new Ubuntu version选择:For long-term support versions。然后转到其他软件制表符和Tick前四个Check boxes。除前四个外,删除或Untick。还要确保Ubuntu 软件选项卡上的所有复选框均已勾选。

    • 然后Close软件源窗口并执行此命令来更新您的存储库:

      sudo apt-get update
      
  2. 现在删除任何剩余配置以及其他垃圾包。以下命令将帮助您:

    sudo apt-get autoremove && sudo apt-get autoclean
    sudo apt-get clean
    sudo apt-get remove --purge $(dpkg -l | grep "^rc" | awk '{print $2}' | tr '\n' ' ')
    sudo apt-get -f install
    

    我希望你先进行第 4 步,而不要进行第 3 步。如果可行,则你不必升级系统,即你可以跳过第 3 步。

  3. 以下命令将帮助您升级系统。

    sudo apt-get update
    sudo apt-get upgrade && sudo apt-get dist-upgrade
    

    如果您已完成此步骤,那么您还必须进行第 4 步。:)

  4. 这些命令将帮助您重新配置已安装的软件包。在您的终端中执行这些命令:

    sudo dpkg-reconfigure -a
    

    此命令需要大约 3-5 分钟的时间,因此请等待。如果执行成功,它将不会给出任何输出,否则将给出错误消息。如果收到任何错误消息,请记下。

    sudo update-grub && sudo initramfs -u
    

最后重启系统一次。希望它能帮助你解决问题。

如果出现问题或者您在使用任何特定命令时遇到错误,请回复并描述该命令和错误消息。

相关内容