在我再次与控制台交互之前,不会打印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 ,直到我再次按下输入才打印任何内容。 这种行为似乎与其他任何事情都不一致。

Update2:在某些时候,我认为一些软件包被删除了。 我将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" $ 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 

我的猜测是,这是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中追逐bug并将其修复可能不太可能,遗憾的是。

我非常怀疑缺少包裹是原因。

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

  1. 首先打开软件源以确保您能够毫无问题地升级系统:

    • 在终端中执行sudo software-properties-gtk并转到Updates选项卡。 Tick前两个Check boxes ,并在同一选项卡中Notify me of a new Ubuntu version ,选择: For long-term support versions 。 然后转到“ 其他软件”选项卡并Tick前四个Check boxes 。 除了前四个,要么删除要么取消。 还要确保在Ubuntu软件选项卡中勾选所有复选框。

    • 然后关闭软件源”窗口并执行此命令以更新存储库:

       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. Follow命令将帮助您升级系统。

     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 

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

如果出现问题,或者在描述命令和错误消息的任何特定命令中出现任何错误,请回复。