Ubuntu 更新错误修复大全
- 格式:doc
- 大小:51.00 KB
- 文档页数:5
ubuntu20.04与win7UEFI+GPT双启动修复 ⽼笔记本,⼀直⽤的ubuntu14.04与win7双系统。
因为怕折腾,⼀直没有升级ubuntu,毕竟⾥⾯有数年常⽤的数据、软件,升级的话不折腾⼏天是搞不定的。
不过ubuntu14.04的⽀持基本到头了,趁着ubuntu20.04 LTS新鲜出炉,决定尝试⼀下。
这⼀尝试,⾸先出现的问题就是引导挂了。
只进⼊了grub shell,然后我进⼊LiveCD⽤boot-repair⼀顿操作,把win7的启动也弄挂了,这。
只能⼿动慢慢修了。
要修就得先知道UEFI是怎么⼯作的,这⾥先简单说下UEFI的启动过程。
⽀持UEFI的主板上都有NVRAM(Non-Volatile Ram即掉电也不丢失数据的存储空间),安装操作系统的时候,通常都会在NVRAM写⼊引导项,这个列表除了安装操作系统时写⼊的引导项,还有⼀些固定的硬件引导项,⽐如硬盘、U盘、⽹络启动)。
在开机的时候,进⼊BIOS应该是能看到这个列表的,不同的主板操作不⼀样,我机⼦上的NVRAM列表看起来是这样的:ubuntu是安装ubuntu时写⼊的引导项,IPV4、Boot From EFI File则是⼀些固定的硬件引导项。
实现UEFI启动,硬盘上还需要有⼀个ESP分区(EFI system partition),然后安装操作系统时,会在ESP分区写⼊引导⽂件。
我机⼦上的ESP分区⼤概是这样的:~$ sudo tree /boot/efi/EFI -L 3/boot/efi/EFI├── Boot│├── BOOTX64.CSV│├── bootx64.efi│├── grub.cfg│├── grubx64.efi│├── mmx64.efi│└── shimx64.efi├── Microsoft│└── Boot│├── BCD│├── BCD.LOG│├── BCD.LOG1│├── BCD.LOG2│├── bootmgfw.efi│├── bootmgr.efi│├── BOOTSTAT.DAT│├── cs-CZ│├── da-DK│├── de-DE│├── el-GR│├── en-US│├── es-ES│├──fi-FI│├── Fonts│├── fr-FR│├── hu-HU│├── it-IT│├── ja-JP│├── ko-KR│├── memtest.efi│├── nb-NO│├──nl-NL│├── pl-PL│├── pt-BR│├── pt-PT│├── ru-RU│├── sv-SE│├──tr-TR│├── zh-CN│├── zh-HK│└── zh-TW└── ubuntu├── BOOTX64.CSV├── grub.cfg├── grubx64.efi├── mmx64.efi└── shimx64.efi28 directories, 19 files其中,Boot⽬录是ESP分区的默认⽬录,Microsoft是win7的引导⽬录,ubuntu则是ubuntu的引导⽬录,注意,ESP分区是fat格式,这些⽬录及⽂件名不区分⼤⼩写。
Ubuntu12.04更新源⼤全(国内)使⽤国外源太慢了,修改为国内源会快很多。
这⾥就为⼤家分享⼀下修改⽅法,需要的朋友可以参考⼀下1.sudo gedit /etc/apt/sources.list编辑你的源列表,将原来的内容全部删除或者做⼀下备份sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份当前的源列表)添加下⾯列表中最适合你的源(注意不要全部添加),选择⼀个最合适你的即可,复制到你的列表中,然后保存列表。
2.sudo apt-get update 更新源列表信息可以在运⾏“sudo apt-get update ”时查看⼀下错误信息,把不能连接的源删除再重新运⾏“sudo apt-get update ”。
3.sudo apt-get upgrade 升级或者⽤ubuntu⾃带的更新管理器升级也可Ubuntu 12.04 源列表:163源( ⾸选 ):sohu源:源(推荐):教育⽹源如果你是在校⼤学⽣,可以使⽤校园⽹/教育⽹,就是⽤教育⽹的资源吧,尤其是⽀持ipv6的,那更新速度就按兆算了。
电⼦科技⼤学:中国科技⼤学:北京交⼤:4、更新源(在终端⾥敲如下命令)sudo apt-get update安装Ubuntu18.04后,使⽤国外源太慢了,修改为国内源会快很多。
修改阿⾥源为Ubuntu 18.04默认的源备份/etc/apt/sources.list#备份cp /etc/apt/sources.list /etc/apt/sources.list.bak在/etc/apt/sources.list⽂件前⾯添加如下条⽬#添加阿⾥源最后执⾏如下命令更新源##更新sudo apt-get updatesudo apt-get upgrade另外其他⼏个国内源如下:中科⼤源163源清华源这篇⽂章就介绍到这了。
ubuntu编译相关--./configure错误sudo apt-get install软件包这个是更新你指定的软件包sudo apt-get update获取更新列表sudo apt-get dist-upgrade开始更新./configure的问题错误:C compiler cannot create executables解决:sudo apt-get gcc libc6-dev错误:checking for C compiler default output...configure:error:C compiler cannot create executables解决:sudo apt-get install libc6-dev错误:configure:error:C preprocessor"/lib/cpp"fails sanity check原因:gcc的组件没装全解决:apt-get install build-essential错误:Can't find X includes.Please check your installation and add the correct paths!原因:没有X的包含文件解决:安装xlibs-dev即可错误:Qt(>=Qt3.0)(headers and libraries)not found.Please check your installation!原因:查找提供qt的lib&&headers的软件包,并安装之解决:apt-get install libqt3-headers libqt3-mt-dev错误:in the prefix,you've chosen,are no KDE headers installed.This will fail.So,check this please and use another prefix!原因:install a KDE application in a Gnome environment。
Ubuntu16.04安装搜狗拼⾳输⼊法错误问题的解决⽅法⼀、环境介绍Ubuntu 16.04搜狗输⼊法: sogoupinyin_2.0.0.0078_amd64⼆、问题表现sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb错误信息如下:sogoupinyin : Depends: libopencc2 but it is not installable orlibopencc1 but it is not going to be installedDepends: fcitx-libs (>= 4.2.7) but it is not going to be installedDepends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installedRecommends: fonts-droid-fallback but it is not going to be installed orfonts-droid but it is not installableE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).⼀看就知道是依赖包存在问题三、问题分析之前在Ubuntu 15.10的版本之时,使⽤同样的sogou版本,不存在此类的问题。
但是在Ubuntu 16.04中,却存在此类问题,说明Ubuntu升级之后,sogou输⼊法并未做相应的系统兼容性测试,故起最⾼的Ubuntu⽀持版本时15.10.虽然我们知道了问题,但是该如何解决呢?基于错误信息,我们发现起依赖包有以下⼏个: libopencc1 libopencc2, fcitx-libs, fcitx-libs-qt font-droid-fallback.四、试错分析试错1:bladestone@bladestone-laptop:~$ sudo apt install fcitx-libsReading package lists... DoneBuilding dependency treeReading state information... DoneYou might want to run 'apt-get -f install' to correct these:The following packages have unmet dependencies:sogoupinyin : Depends: libopencc2 but it is not installable orlibopencc1 but it is not going to be installedDepends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installedRecommends: fonts-droid-fallback but it is not going to be installed orfonts-droid but it is not installableE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).试错2:bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs-qtReading package lists... DoneBuilding dependency treeReading state information... DoneYou might want to run 'apt-get -f install' to correct these:The following packages have unmet dependencies:sogoupinyin : Depends: libopencc2 but it is not installable orlibopencc1 but it is not going to be installedDepends: fcitx-libs (>= 4.2.7) but it is not going to be installedRecommends: fonts-droid-fallback but it is not going to be installed orfonts-droid but it is not installableE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).试错3:bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs-qt fcitx-libsReading package lists... DoneBuilding dependency treeReading state information... DoneYou might want to run 'apt-get -f install' to correct these:The following packages have unmet dependencies:sogoupinyin : Depends: libopencc2 but it is not installable orlibopencc1 but it is not going to be installedRecommends: fonts-droid-fallback but it is not going to be installed orfonts-droid but it is not installableE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).试错4:bladestone@bladestone-laptop:~$ sudo apt install fonts-droid-fallbackReading package lists... DoneBuilding dependency treeReading state information... DoneYou might want to run 'apt-get -f install' to correct these:The following packages have unmet dependencies:sogoupinyin : Depends: libopencc2 but it is not installable orlibopencc1 but it is not going to be installedDepends: fcitx-libs (>= 4.2.7) but it is not going to be installedDepends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installedE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).试错5:bladestone@bladestone-laptop:~$ sudo apt install libopencc1Reading package lists... DoneBuilding dependency treeReading state information... DoneYou might want to run 'apt-get -f install' to correct these:The following packages have unmet dependencies:sogoupinyin : Depends: fcitx-libs (>= 4.2.7) but it is not going to be installedDepends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installedRecommends: fonts-droid-fallback but it is not going to be installed orfonts-droid but it is not installableE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).分析:经过各种尝试,发现依然⽆法正常解决问题,类库包之间的依赖关系还是⾮常复杂的。
ubuntu 12.10 常见问题及解决方法(收集汇总),分享经验,帮忙解答各楼层...如果您的电脑是需要用于重要的工作,不推荐安装使用Ubuntu 12.10版,因为这个版本正在做较大的修改和测试,把Unity 2D桌面取消了,这是为了在以后“统一”桌面做准备,所以在Ubuntu 12.10版中使用带3D特效的Unity桌面或者另行安装使用Gnome-Shell桌面时,常常会出现一些问题。
建议使用Ubuntu 12.04 LTS稳定版,或者使用其他针对专业应用的、使用其他桌面的Ubuntu 12.10官方衍生版,等候明年13.04的发布。
(1)安装时如果勾选了“下载安装第三方软件、安装MP3解码”之后,点击“下一步”长时间停滞不动……——也许是网络下载缓慢造成,建议先不要勾选这两项,以后再安装这两项。
安装时,又要花很多时间下载N多软件包和语言包,好无聊……这时可以鼠标点击“新功能介绍”的链接,会弹出Firefox浏览器,可以上网看网页(只可惜无法输入中文)。
(2)登录时输入正确的用户密码之后,屏幕闪一下,又跳回登录界面,无法进入桌面……——按Ctrl Alt F1 切换到终端登录,(注意:如果此时数字小键盘的Num灯是亮的,需要按两下Num Lock键,让Num 灯灭了再亮,然后才能输入数字。
)登录后在用户目录下运行以下命令删除这个.Xauthority 文件即可。
代码:rm .Xauthority——(感谢:47楼hwclong911)我用最新的12.10 也有这个情况。
每次用shell script后,重新启动就会这样。
startx 后屏幕就是一个橙色的白板没有任务栏也没有状态栏代码:CTRL+ALT+T 切出Terminal 后/usr/bin/unity start 就好了。
(3)用户登录后桌面一片空白,没有任务栏和侧边栏,只有鼠标和壁纸,可以按Ctrl Alt Del 键弹出“注销”窗口……——按Ctrl Alt T 弹出终端窗口(或者按Ctrl Alt F1 切换到终端登录),然后运行以下命令删除错误的用户配置文件即可。
Ubuntu常见错误问题的解决⽅法⼩结错误1: ./configurechecking for getifaddrs... yeschecking ifaddrs.h usability... yeschecking ifaddrs.h presence... yeschecking for ifaddrs.h... yeschecking for socklen_t... yeschecking for getaddrinfo... yeschecking whether to build optimizer debugging code... nochecking whether to build parser debugging code... nochecking whether we have DAG API headers... nochecking whether we have Septel API headers... nochecking whether we have Myricom Sniffer API... nochecking whether TurboCap is supported... nochecking for flex... nochecking for lex... noconfigure: error: Neither flex nor lex was found.核⼼错误信息为: error: Neither flex nor lex was found.解决办法: sudo apt-get install flex bisonReading package lists... DoneBuilding dependency treeReading state information... DoneThe following package was automatically installed and is no longer required:linux-image-extra-4.4.0-34-genericUse 'sudo apt autoremove' to remove it.The following additional packages will be installed:libbison-dev libfl-devSuggested packages:bison-docThe following NEW packages will be installed:bison flex libbison-dev libfl-dev0 upgraded, 4 newly installed, 0 to remove and 7 not upgraded.Need to get 900 kB of archives.After this operation, 2,692 kB of additional disk space will be used.Do you want to continue? [Y/n] yGet:1 /ubuntu xenial/main amd64 libfl-dev amd64 2.6.0-11 [12.5 kB]Get:2 /ubuntu xenial/main amd64 flex amd64 2.6.0-11 [290 kB]Get:3 /ubuntu xenial/main amd64 libbison-dev amd64 2:3.0.4.dfsg-1 [338 kB]Get:4 /ubuntu xenial/main amd64 bison amd64 2:3.0.4.dfsg-1 [259 kB]Fetched 900 kB in 1s (518 kB/s)Selecting previously unselected package libfl-dev:amd64.然后输⼊==> sudo make install , 进⾏安装错误2:checking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for pcap_open_live in -lpcap... noerror: pcap library not found!问题解决:sudo apt-get install libsqlite3-dev libpcap-dev然后重新尝试新的命令,即可解决上述错误⼆、中⽂模式下切换回英⽂模式?修改/etc/default/locale⽂件的语⾔值。
UbuntuLinux内核更新后VirtualBox无法启动的解决-电脑资料From 独自等待'blog几天由于更新玩乐网站不开自己的Linux电脑,今天开了,看了一下这期间Ubuntu的更新,一堆!想都没想就开始更新了,。
更新倒是一切顺利。
后来开VirtualBox,居然蹦出个错误来:VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Re-setup the kernel module by executing ‘/etc/init.d/vboxdrv setup’ as root.VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).Result Code: 0×80004005Component: ConsoleInterface: IConsole{1dea5c4b-0753-4193-b909-22330f64ec45}提示说在终端里输入sudo /etc/init.d/vboxdrv setup仍然不行。
给的信息是Stopping VirtualBox kernel module: vboxdrv.Recompiling VirtualBox kernel module: vboxdrv* Look at /var/log/vbox-install.log to find out what went wrong打开/var/log/vbox-install.log文件,上书:cp:missing destination file operand after “/tmp/vbox.0/Module.symvers”请尝试执行”cp –help”来获取更多信息,电脑资料《Ubuntu Linux内核更新后VirtualBox无法启动的解决》(https://www.)。
ubuntu22.10总是报错解决方法
有些用户发现,自己在更新ubuntu22.10版本后,总是遇到报错,但是不知道怎么解决,这时候我们可以尝试打开终端,在其中输入对应命令的方式即可解决。
ubuntu22.10总是报错解决方法:1、首先,我们按下“ctrl+alt+t”打开终端。
2、打开后,输入“sudo rm /var/crash/*”并回车允许看看能不能解决。
3、如果还是不行,再执行“sudo gedit /etc/default/apport”命令打开一个文件。
4、打开后,将其中的“enabled=1”改成“enabled=0”并保存即可解决。
5、如果上面的两个命令还是无法解决,可能是系统版本和软件不兼容导致的。
6、可以尝试重装对应版本的软件,或者更新或回退系统版本应该就能解决了。
ubuntu20.04安装EasyConnect兼容性问题解决
⽬录
Ubuntu20.04安装EasyConnect后⽆法启动的解决⽅案
⼯作使⽤操作系统为Ubuntu,开始为18.04,后来升级到20.04,在安装了EasyConnect后点击图标⽆反应,具体解决过程如下:
1. 命令⾏启动EasyConnect
结果如下图所⽰
原因:可能是electron框架版本太⽼的问题,但是electron开发者并不能解决这个问题,所以我们使⽤其他办法解决。
2. 降级pango
幸运的是,有⽹友发现可以通过降级pango等依赖解决问题。
错误信息提⽰Harfbuzz版本太旧了,实际上是因为pango版本太新了。
需要做的不是升级Harfbuzz,⽽是降级pango。
为了防⽌修改系统库带来的风险,直接将相关的so库⽂件解压到easyconnect同⽬录下即可。
查看涉及降级的⽂件,进⼊EasyConnect所在⽬录,查看涉及⽂件,如下:
下载⽂件,解压后放到EasyConnect安装⽬录下
点击搜索可以看到pango的具体版本
从上⾯下载链接下载对应的版本
下载后解压.deb⽂件,进⼊解压后⽂件夹,继续解压data.tar.xz,将解压后的data/usr/lib/x86_64-linux-gnu/ 下的两个⽂件复制到EasyConnect下
查看降级后相关的⽂件
3. 重新启动EasyConnect,即可成功启动。
Ubuntu服务器崩溃后修理:emergencymode序曲参考you are in emergency mode虚拟机启动后,突然就发现进不去,所以就百度搜索了⼀下这个问题。
oh........是挂载硬盘出错导致的。
这个时候,按CTRL + D,然后直接输⼊密码(最好是root的密码)。
然后enter然后使⽤下⾯这个命令:vim /etc/fstab进去以后,确定哪些是你的系统硬盘,哪些是你后来添加的。
因为不知道是哪个挂载出了问题,所以我把两条挂载记录都注释掉。
然后输⼊下⾯这个命令,也就是重启reboot1. 紧急模式参考修复 Ubuntu gives message “Welcome to emergency mode !”The Emergency Mode sometime means that your file system may be corrupted. In such cases, you will be left out with a prompt to go nowhere.All you have to do is perform a file system check using,fsck.ext4 /dev/sda3where sda3 can be your partition and if you are using ext3 file system, change the command as follows:fsck.ext3 /dev/sda3About the partition number, Linux shows you the partition before arriving at the prompt.2. 修复ubuntu ⿊屏进⼊不了图形界⾯ dev/sda1: clean, 552599/6111232 files, 7119295/24414464 blocks参考⼀)、修改boot启动项开始的时候电脑开不了机(开机之后,先是紫屏,再⼀直是⿊屏),重启了⼏次发现依旧如此,就修改了boot启动顺序,LEFI启动Leacy启动都试了;之后根据启动的瞬间屏幕亮出的in unsecure boot,也尝试改成不安全启动;有了效果,开机画⾯变了,然后出现了⼀个⿊框,嗯,就是最开头的图,可以输⼊内容、Enter键,但是不会执⾏,Ctrl+Alt+F2,居然能⽤,切换到TTY2界⾯,长舒了⼝⽓,还有救。
Ubuntu 更新错误修复大全
在Ubuntu更新中,谁没有碰见个错误?在Ubuntu和其它基于Ubuntu的Linux发行版中,更新错误是一个共性的错误,也经常发生。
这些错误出现的原因多种多样,修复起来也很简单。
在本文中,我们将见到Ubuntu中各种类型频繁发生的更新错误以及它们的修复方法。
当你在终端中运行更新命令时,你可能会碰到这个错误“合并列表错误”,就像下面这样:E:Encountered a section with no Package: header,
E:Problem with MergeList
/var/lib/apt/lists/ ubuntu dists precise universe binary-i38
6Packages,
E:The package lists or status file could not be parsed or opened.’可以使用以下命令来修复该错误:
1.sudo rm -r /var/lib/apt/lists/*
2.sudo apt-get clean && sudo apt-get update
实际上,有两种类型的下载仓库信息失败错误。
如果你的错误是这样的:
W:Failed to fetch
bzip2:/var/lib/apt/lists/partial/ ubuntu dists oneiric res
tricted binary-i386Packages Hash Sum mismatch,
W:Failed to fetch
bzip2:/var/lib/apt/lists/partial/ ubuntu dists oneiric mul
tiverse binary-i386Packages Hash Sum mismatch,
E:Some index files failed to download. They have been ignored, or old ones
used instead
那么,你可以用以下命令修复:
1.var/*
2.sudo apt-get update
下载仓库信息失败的另外一种类型是由于PPA过时导致的。
通常,当你运行更新管理器,并看到这样的错误时:
你可以运行sudo apt-get update来查看哪个PPA更新失败,你可以把它从源列表中删除。
你可以按照这个截图指南来修复下载仓库信息失败错误。
一个类似的错误是下载包文件失败错误,像这样:
该错误很容易修复,只需修改软件源为主服务器即可。
转到“软件和更新”,在那里你可以修改下载服务器为主服务器:
在终端中运行更新会出现部分更新错误:
Not all updates can be installed
Run a partial upgrade, to install as many updates as possible
在终端中运行以下命令来修复该错误:
1.sudo apt-get install -f
该错误更多是安装错误,而不是更新错误。
如果尝试从源码安装程序,你可能会碰到这个错误:
error while loading shared libraries:
cannot open shared object file: No such file or directory
该错误可以通过在终端中运行以下命令来修复:
1.
你可以在这里查找到更多详细内容加载共享库时发生错误。
在另一个程序在使用APT时,会发生该错误。
假定你正在Ubuntu软件中心安装某个东西,然后你又试着在终端中运行apt。
E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource
temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
通常,只要你把所有其它使用apt的程序关了,这个问题就会好的。
但是,如果问题持续,可以使用以下命令:
1.sudo rm /var/lib/apt/lists/lock
如果上面的命令不起作用,可以试试这个命令:
1.sudo killall apt-get
关于该错误的更多信息,可以在这里找到。
在添加一个PPA时,可能会导致以下错误GPG错误:下列签名无法验证,这通常发生在终端中运行更新时:
W: GPG error: saucy InRelease: The
following signatures couldn’t be verified becau se the public key is not
available: NO_PUBKEY 68980A0EA10B4DE8
我们所要做的,就是获取系统中的这个公钥,从信息中获取密钥号。
在上述信息中,密钥号为68980A0EA10B4DE8。
该密钥可通过以下方式使用:
1.68980A0EA10B4DE8
在添加密钥后,再次运行更新就没有问题了。
另外一个与签名相关的Ubuntu更新错误是BADSIG错误,它看起来像这样:
W: A error occurred during the signature verification. The repository is not
updated and the previous index files will be used. GPG
error: precise Release: The following signatures
were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive
Automatic Signing Key
W: GPG error: precise Release:
The following signatures were invalid: BADSIG 4C1CBC1B69B0E2F4
Launchpad PPA for Jonathan French W: Failed to
fetch /ubuntu/dists/precise/Release
要修复该BADSIG错误,请在终端中使用以下命令:
1.sudo apt-get clean
2.cd /var/lib/apt
3.sudo mv lists oldlist
4.sudo mkdir -p lists/partial
5.sudo apt-get clean
6.sudo apt-get update
本文汇集了你可能会碰到的Ubuntu更新错误,我希望这会对你处理这些错误有所帮助。
你在Ubuntu中是否也碰到过其它更新错误呢?请在下面的评论中告诉我,我会试着写个快速指南。