ubuntu 上下载编写

本文总结了在Ubuntu系统中遇到的一些安装问题,包括apt-get时出现的ssh包不可用错误,add-apt-repository命令未找到,jdk安装失败,flex bison等软件包安装失败,以及repo下载问题。提供了相应的解决步骤和替代方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

学习的老罗的:

https://blog.youkuaiyun.com/Luoshengyang/article/details/6559955

 

 

1: 遇到的第一个问题

sudo apt-get install git-core gnupg 运行失败:

ubuntu进行apt-get时候出现Package ssh is not available, but is referred to by another package 错误

今天在ubuntu进行ssh安装的时候,出现如下错误。

 

Reading package lists... Done

Building dependency tree... Done

Package ssh is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source


这个问题的原因是ubuntu的/etc/apt/source.list中的源比较旧了,需要更新一下,更新方法:

$ sudo apt-get -y update

更新完毕之后,在使用apt-get就没有问题了。

 

2:第二个问题:

sudo add-apt-repository ppa:ferramroberto/java 执行失败

在给NanoPI安装tvheadend的时候,参照http://www.havetheknowhow.com/Install-the-software/Install-TVHeadend.html
执行:apt-add-repository http://apt.tvheadend.org/stable
提示: add-apt-repository:command not found
网上解决办法是直接安装工具包
命令:sudo apt-get install python-software-properties
但是亲测安装后还是报command not found,所以依赖包还没有安装完全,少了什么呢?
执行命令:add-apt-repository ,提示要安装python-software-properties外还需要software-properties-common
ok,执行安装命令:sudo apt-get install software-properties-common
再次sudo apt-add-repository http://apt.tvheadend.org/stable

 

3: jdk 安装失败

 USER-NAME@MACHINE-NAME:~$ sudo apt-get install sun-java6-jre sun-java6-plugin
     USER-NAME@MACHINE-NAME:~$ sudo apt-get install sun-java6-jdk 
 

解决方法:sudo apt-get install default-jdk

 

4: sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl

执行失败

 

5: wget https://dl-ssl.google.com/dl/googlesource/git-repo/repo 执行失败

可以使用

curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo

 

参考:https://blog.youkuaiyun.com/lhj0711010212/article/details/12749393

今天下载Android源码遇到了一点小问题,后来在一个哥们的博客上找到了答案,分享给大家

repo:
http://code.google.com/p/git-repo/

之前的

curl -v https://android.git.kernel.org/repo > ~/bin/repo
已经不能用了,网址解析不到...

android.git.kernel.org现在被黑了,所以调整源码地址为:
codeaurora.org

curl http://git-repo.googlecode.com/files/repo-1.13 > ~/bin/repo

chmod a+x ~/bin/repo

PATH=~/bin:$PATH

mkdir WORKING_DIRECTORY

cd WORKING_DIRECTORY

repo init -u
git://codeaurora.org/platform/manifest.git

repo sync

repo init -u git://codeaurora.org/platform/manifest.git -b gingerbread (可选)

repo sync(可选)

上述方法下载的源码最新的应该是4.1.2,经过本人多次尝试,

 

6: 

repo init -u https://dl-ssl.google.com/dl/googlesource/git-repo/repo

没有反应

 

官方的:https://source.android.google.cn/source/downloading

 

7: git clone 的 index-pack died of signal 9451266), 567.42 MiB | 12.03 MiB/s

就是内存不够,在其他机器上面拷贝以后放上去

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值