最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Ubuntu中用sudo apt-get install安装某软件,结果出错:E: Unable to locate package makeinfo

Ubuntu crifan 29560浏览 0评论

【问题】

折腾:

【记录】在Ubuntu下用crosstool-ng编译xscale的交叉工具链

期间,安装makeinfo时出问题:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ ./configure --prefix=/opt/crosstool-ng
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking whether sed understands -r -i -e... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for objcopy... objcopy
checking for absolute path to objcopy... /usr/bin/objcopy
checking for objdump... objdump
checking for absolute path to objdump... /usr/bin/objdump
checking for readelf... readelf
checking for absolute path to readelf... /usr/bin/readelf
checking for bison... bison
checking for flex... flex
checking for gperf... gperf
checking for makeinfo... no
configure: error: missing required tool: makeinfo
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install makeinfo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package makeinfo
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ 

【解决过程】

1.之前就弄过这类事情。知道是更换源。

2.参考:

ubuntu下配置lamp环境遇到 Unable to locate package错误解决办法

所以换源之前,先去update一下:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install makeinfo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package makeinfo
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get update
Get:1 http://extras.ubuntu.com raring Release.gpg [72 B]                       
Get:2 http://security.ubuntu.com raring-security Release.gpg [933 B]           
Hit http://extras.ubuntu.com raring Release                                    
Get:3 http://security.ubuntu.com raring-security Release [40.8 kB]
Hit http://extras.ubuntu.com raring/main Sources                               
Hit http://extras.ubuntu.com raring/main i386 Packages                   
Get:4 http://security.ubuntu.com raring-security/main Sources [36.2 kB]        
Hit http://us.archive.ubuntu.com raring Release.gpg                            
Get:5 http://us.archive.ubuntu.com raring-updates Release.gpg [933 B]         
Get:6 http://us.archive.ubuntu.com raring-backports Release.gpg [933 B]       
Hit http://us.archive.ubuntu.com raring Release                                
Get:7 http://us.archive.ubuntu.com raring-updates Release [40.8 kB]            
Get:8 http://security.ubuntu.com raring-security/restricted Sources [14 B]     
Ign http://extras.ubuntu.com raring/main Translation-en_US                     
Get:9 http://us.archive.ubuntu.com raring-backports Release [40.8 kB] 
Get:10 http://security.ubuntu.com raring-security/universe Sources [8,839 B]   
Ign http://extras.ubuntu.com raring/main Translation-en                        
Get:11 http://security.ubuntu.com raring-security/multiverse Sources [1,825 B] 
Get:12 http://security.ubuntu.com raring-security/main i386 Packages [94.3 kB] 
Hit http://us.archive.ubuntu.com raring/main Sources                           
Hit http://us.archive.ubuntu.com raring/restricted Sources                     
Hit http://us.archive.ubuntu.com raring/universe Sources                       
Hit http://us.archive.ubuntu.com raring/multiverse Sources                     
Hit http://us.archive.ubuntu.com raring/main i386 Packages                     
Hit http://us.archive.ubuntu.com raring/restricted i386 Packages               
Hit http://us.archive.ubuntu.com raring/universe i386 Packages                 
Hit http://us.archive.ubuntu.com raring/multiverse i386 Packages               
Hit http://us.archive.ubuntu.com raring/main Translation-en                    
Hit http://us.archive.ubuntu.com raring/multiverse Translation-en              
Hit http://us.archive.ubuntu.com raring/restricted Translation-en              
Hit http://us.archive.ubuntu.com raring/universe Translation-en                
Get:13 http://us.archive.ubuntu.com raring-updates/main Sources [57.5 kB]      
Get:14 http://us.archive.ubuntu.com raring-updates/restricted Sources [14 B]   
Get:15 http://security.ubuntu.com raring-security/restricted i386 Packages [14 B]
Get:16 http://us.archive.ubuntu.com raring-updates/universe Sources [68.5 kB]  
Get:17 http://security.ubuntu.com raring-security/universe i386 Packages [32.9 kB]
Get:18 http://us.archive.ubuntu.com raring-updates/multiverse Sources [1,825 B]
Get:19 http://us.archive.ubuntu.com raring-updates/main i386 Packages [148 kB] 
Get:20 http://us.archive.ubuntu.com raring-updates/restricted i386 Packages [14 B]
Get:21 http://us.archive.ubuntu.com raring-updates/universe i386 Packages [133 kB]
Get:22 http://security.ubuntu.com raring-security/multiverse i386 Packages [3,612 B]
Hit http://security.ubuntu.com raring-security/main Translation-en             
Hit http://security.ubuntu.com raring-security/multiverse Translation-en       
Hit http://security.ubuntu.com raring-security/restricted Translation-en       
Get:23 http://us.archive.ubuntu.com raring-updates/multiverse i386 Packages [3,612 B]
Get:24 http://security.ubuntu.com raring-security/universe Translation-en [20.9 kB]
Hit http://us.archive.ubuntu.com raring-updates/main Translation-en            
Hit http://us.archive.ubuntu.com raring-updates/multiverse Translation-en      
Hit http://us.archive.ubuntu.com raring-updates/restricted Translation-en      
Get:25 http://us.archive.ubuntu.com raring-updates/universe Translation-en [70.8 kB]
Get:26 http://us.archive.ubuntu.com raring-backports/main Sources [14 B]       
Get:27 http://us.archive.ubuntu.com raring-backports/restricted Sources [14 B] 
Get:28 http://us.archive.ubuntu.com raring-backports/universe Sources [5,134 B]
Get:29 http://us.archive.ubuntu.com raring-backports/multiverse Sources [1,403 B]
Get:30 http://us.archive.ubuntu.com raring-backports/main i386 Packages [14 B] 
Get:31 http://us.archive.ubuntu.com raring-backports/restricted i386 Packages [14 B]
Get:32 http://us.archive.ubuntu.com raring-backports/universe i386 Packages [6,239 B]
Get:33 http://us.archive.ubuntu.com raring-backports/multiverse i386 Packages [1,345 B]
Hit http://us.archive.ubuntu.com raring-backports/main Translation-en          
Hit http://us.archive.ubuntu.com raring-backports/multiverse Translation-en    
Hit http://us.archive.ubuntu.com raring-backports/restricted Translation-en    
Ign http://security.ubuntu.com raring-security/main Translation-en_US          
Get:34 http://us.archive.ubuntu.com raring-backports/universe Translation-en [4,983 B]
Ign http://security.ubuntu.com raring-security/multiverse Translation-en_US    
Ign http://security.ubuntu.com raring-security/restricted Translation-en_US    
Ign http://security.ubuntu.com raring-security/universe Translation-en_US      
Ign http://us.archive.ubuntu.com raring/main Translation-en_US                 
Ign http://us.archive.ubuntu.com raring/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com raring/restricted Translation-en_US
Ign http://us.archive.ubuntu.com raring/universe Translation-en_US
Ign http://us.archive.ubuntu.com raring-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com raring-updates/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com raring-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com raring-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com raring-backports/main Translation-en_US
Ign http://us.archive.ubuntu.com raring-backports/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com raring-backports/restricted Translation-en_US
Ign http://us.archive.ubuntu.com raring-backports/universe Translation-en_US
Fetched 827 kB in 52s (15.7 kB/s)
Reading package lists... Done
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ 

3.结果发现,剪贴板无法共享了,所以再去解决此问题:

【已解决】VMWare Workstation和Ubuntu之间无法共享(复制和粘贴)剪贴板

4.然后再去试试apt-get能否找到makeinfo,结果还是不行:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install makeinfo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package makeinfo
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ 

5.看来只能去换sourcelist了。

6.参考:

Makeinfo package not found in 12.04

去试试,结果发现其实是需要安装texinfo,然后就去安装:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ makeinfo
The program 'makeinfo' is currently not installed. You can install it by typing:
sudo apt-get install texinfo
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install texinfo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  texlive-base texlive-latex-base texlive-generic-recommended
  texinfo-doc-nonfree
The following NEW packages will be installed:
  texinfo
0 upgraded, 1 newly installed, 0 to remove and 203 not upgraded.
Need to get 449 kB of archives.
After this operation, 1,192 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ raring/main texinfo i386 4.13a.dfsg.1-10ubuntu4 [449 kB]
Fetched 449 kB in 3s (125 kB/s)                        
Selecting previously unselected package texinfo.
(Reading database ... 156975 files and directories currently installed.)
Unpacking texinfo (from .../texinfo_4.13a.dfsg.1-10ubuntu4_i386.deb) ...
Processing triggers for man-db ...
Setting up texinfo (4.13a.dfsg.1-10ubuntu4) ...
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ 

 

7.然后又去试试那个apt-file,结果由于速度太慢,还是终止了:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ apt-file search makeinfo
The program 'apt-file' is currently not installed. You can install it by typing:
sudo apt-get install apt-file
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install apt-file
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  curl libconfig-file-perl libcurl3 liblist-moreutils-perl
  libregexp-assemble-perl
The following NEW packages will be installed:
  apt-file curl libconfig-file-perl liblist-moreutils-perl
  libregexp-assemble-perl
The following packages will be upgraded:
  libcurl3
1 upgraded, 5 newly installed, 0 to remove and 202 not upgraded.
Need to get 545 kB of archives.
After this operation, 947 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ raring-updates/main libcurl3 i386 7.29.0-1ubuntu3.1 [249 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ raring-updates/main curl i386 7.29.0-1ubuntu3.1 [149 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ raring/universe libconfig-file-perl all 1.50-2 [10.1 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ raring/main liblist-moreutils-perl i386 0.33-1build2 [47.8 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ raring/universe libregexp-assemble-perl all 0.35-7 [62.5 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ raring/universe apt-file all 2.5.1ubuntu1 [27.2 kB]
Fetched 545 kB in 58s (9,321 B/s)                                              
(Reading database ... 157029 files and directories currently installed.)
Preparing to replace libcurl3:i386 7.29.0-1ubuntu3 (using .../libcurl3_7.29.0-1ubuntu3.1_i386.deb) ...
Unpacking replacement libcurl3:i386 ...
Selecting previously unselected package curl.
Unpacking curl (from .../curl_7.29.0-1ubuntu3.1_i386.deb) ...
Selecting previously unselected package libconfig-file-perl.
Unpacking libconfig-file-perl (from .../libconfig-file-perl_1.50-2_all.deb) ...
Selecting previously unselected package liblist-moreutils-perl.
Unpacking liblist-moreutils-perl (from .../liblist-moreutils-perl_0.33-1build2_i386.deb) ...
Selecting previously unselected package libregexp-assemble-perl.
Unpacking libregexp-assemble-perl (from .../libregexp-assemble-perl_0.35-7_all.deb) ...
Selecting previously unselected package apt-file.
Unpacking apt-file (from .../apt-file_2.5.1ubuntu1_all.deb) ...
Processing triggers for man-db ...
Setting up libcurl3:i386 (7.29.0-1ubuntu3.1) ...
Setting up curl (7.29.0-1ubuntu3.1) ...
Setting up libconfig-file-perl (1.50-2) ...
Setting up liblist-moreutils-perl (0.33-1build2) ...
Setting up libregexp-assemble-perl (0.35-7) ...
Setting up apt-file (2.5.1ubuntu1) ...
The system-wide cache is empty. You may want to run 'apt-file update'
as root to update the cache. You can also run 'apt-file update' as
normal user to use a cache in the user's home directory.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ apt-file search makeinfo
E: The cache is empty. You need to run 'apt-file update' first.
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ apt-file update
apt-file is now using the user's cache directory.
If you want to switch back to the system-wide cache directory,
 run 'apt-file purge'
Downloading complete file http://us.archive.ubuntu.com/ubuntu/dists/raring/Contents-i386.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  1 24.9M    1  494k    0     0   5252      0  1:22:52  0:01:36  1:21:16  2893^CDownload of http://us.archive.ubuntu.com/ubuntu/dists/raring/Contents-i386.gz failed
Command died with signal 2
E: Update aborted by signal 2: No such file or directory
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ 

8.此时,可以看出,此处连接到us的ubuntu服务器,速度还是太慢,所以还是要去换成163的那个镜像:

【记录】给Ubuntu更换成163的源(sources.list)

 

【总结】

此处

sudo apt-get install makeinfo

出现:

E: Unable to locate package makeinfo

的原因是:

makeinfo不是一个单独的软件,而是texinfo中的内容。

所以要去安装texinfo即可:

sudo apt-get install texinfo

 

注:

如果是由于源不好,而找不到某软件包,则可以考虑换源,可参考:

【记录】给Ubuntu更换成163的源(sources.list)

转载请注明:在路上 » 【已解决】Ubuntu中用sudo apt-get install安装某软件,结果出错:E: Unable to locate package makeinfo

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.426 seconds, using 22.24MB memory