在 Ubuntu 15.10 上安装 PyCharm – E:无法找到包 pycharm

在 Ubuntu 15.10 上安装 PyCharm – E:无法找到包 pycharm

如何在 Ubuntu 15.10 上安装 PyCharm?尝试按照以下方法操作时 伊斯福斯 E:无法定位软件包 pycharm发生。

user@user-VirtualBox:~$ sudo apt-get install pycharm
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package pycharm

在 Oracle Virtual Box 中运行的 Ubuntu 15.10

user@user-VirtualBox:~$  lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:    15.10
Codename:   wily

/etc/atp/sources.list 的内容是

user@user-VirtualBox:~$ cat /etc/apt/sources.list
#deb cdrom:[Ubuntu 15.10 _Wily Werewolf_ - Release amd64 (20151021)]/ wily main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ wily main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ wily main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ wily-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ wily-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ wily universe
deb-src http://us.archive.ubuntu.com/ubuntu/ wily universe
deb http://us.archive.ubuntu.com/ubuntu/ wily-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ wily-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ wily multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ wily multiverse
deb http://us.archive.ubuntu.com/ubuntu/ wily-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ wily-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ wily-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ wily-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu wily-security main restricted
deb-src http://security.ubuntu.com/ubuntu wily-security main restricted
deb http://security.ubuntu.com/ubuntu wily-security universe
deb-src http://security.ubuntu.com/ubuntu wily-security universe
deb http://security.ubuntu.com/ubuntu wily-security multiverse
deb-src http://security.ubuntu.com/ubuntu wily-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu wily partner
# deb-src http://archive.canonical.com/ubuntu wily partner

apt-get update 的结果是

user@user-VirtualBox:~$ sudo apt-get update
Hit http://us.archive.ubuntu.com wily InRelease
Get:1 http://us.archive.ubuntu.com wily-updates InRelease [64.4 kB]
Get:2 http://security.ubuntu.com wily-security InRelease [64.4 kB]
Hit http://us.archive.ubuntu.com wily-backports InRelease
Hit http://us.archive.ubuntu.com wily/main Sources
Hit http://us.archive.ubuntu.com wily/restricted Sources
Hit http://us.archive.ubuntu.com wily/universe Sources
Hit http://us.archive.ubuntu.com wily/multiverse Sources
Hit http://us.archive.ubuntu.com wily/main amd64 Packages
Hit http://us.archive.ubuntu.com wily/restricted amd64 Packages
Hit http://us.archive.ubuntu.com wily/universe amd64 Packages
Hit http://us.archive.ubuntu.com wily/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com wily/main i386 Packages
Hit http://us.archive.ubuntu.com wily/restricted i386 Packages
Hit http://us.archive.ubuntu.com wily/universe i386 Packages
Hit http://us.archive.ubuntu.com wily/multiverse i386 Packages
Hit http://us.archive.ubuntu.com wily/main Translation-en
Hit http://us.archive.ubuntu.com wily/multiverse Translation-en
Get:3 http://security.ubuntu.com wily-security/main Sources [18.9 kB]
Hit http://us.archive.ubuntu.com wily/restricted Translation-en
Hit http://us.archive.ubuntu.com wily/universe Translation-en
Get:4 http://us.archive.ubuntu.com wily-updates/main Sources [31.7 kB]
Get:5 http://security.ubuntu.com wily-security/restricted Sources [2,854 B]
Get:6 http://us.archive.ubuntu.com wily-updates/restricted Sources [3,741 B]
Get:7 http://us.archive.ubuntu.com wily-updates/universe Sources [7,766 B]
Get:8 http://us.archive.ubuntu.com wily-updates/multiverse Sources [1,922 B]
Get:9 http://security.ubuntu.com wily-security/universe Sources [5,896 B]
Get:10 http://us.archive.ubuntu.com wily-updates/main amd64 Packages [89.0 kB]
Get:11 http://security.ubuntu.com wily-security/multiverse Sources [1,922 B]
Get:12 http://us.archive.ubuntu.com wily-updates/restricted amd64 Packages [13.3 kB]
Get:13 http://us.archive.ubuntu.com wily-updates/universe amd64 Packages [38.0 kB]
Get:14 http://security.ubuntu.com wily-security/main amd64 Packages [58.0 kB]
Get:15 http://us.archive.ubuntu.com wily-updates/multiverse amd64 Packages [5,859 B]
Get:16 http://us.archive.ubuntu.com wily-updates/main i386 Packages [87.6 kB]
Get:17 http://us.archive.ubuntu.com wily-updates/restricted i386 Packages [13.4 kB]
Get:18 http://us.archive.ubuntu.com wily-updates/universe i386 Packages [38.0 kB]
Get:19 http://security.ubuntu.com wily-security/restricted amd64 Packages [10.9 kB]
Get:20 http://us.archive.ubuntu.com wily-updates/multiverse i386 Packages [6,052 B]
Hit http://us.archive.ubuntu.com wily-updates/main Translation-en
Hit http://us.archive.ubuntu.com wily-updates/multiverse Translation-en
Get:21 http://security.ubuntu.com wily-security/universe amd64 Packages [28.9 kB]
Hit http://us.archive.ubuntu.com wily-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com wily-updates/universe Translation-en
Hit http://us.archive.ubuntu.com wily-backports/main Sources
Get:22 http://security.ubuntu.com wily-security/multiverse amd64 Packages [5,859 B]
Hit http://us.archive.ubuntu.com wily-backports/restricted Sources
Hit http://us.archive.ubuntu.com wily-backports/universe Sources
Hit http://us.archive.ubuntu.com wily-backports/multiverse Sources
Get:23 http://security.ubuntu.com wily-security/main i386 Packages [56.9 kB]
Hit http://us.archive.ubuntu.com wily-backports/main amd64 Packages
Hit http://us.archive.ubuntu.com wily-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com wily-backports/universe amd64 Packages
Hit http://us.archive.ubuntu.com wily-backports/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com wily-backports/main i386 Packages
Hit http://us.archive.ubuntu.com wily-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com wily-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com wily-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com wily-backports/main Translation-en
Hit http://us.archive.ubuntu.com wily-backports/multiverse Translation-en
Get:24 http://security.ubuntu.com wily-security/restricted i386 Packages [10.8 kB]
Hit http://us.archive.ubuntu.com wily-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com wily-backports/universe Translation-en
Get:25 http://security.ubuntu.com wily-security/universe i386 Packages [28.9 kB]
Get:26 http://security.ubuntu.com wily-security/multiverse i386 Packages [6,052 B]
Hit http://security.ubuntu.com wily-security/main Translation-en
Hit http://security.ubuntu.com wily-security/multiverse Translation-en
Hit http://security.ubuntu.com wily-security/restricted Translation-en
Hit http://security.ubuntu.com wily-security/universe Translation-en
Fetched 701 kB in 3s (217 kB/s)
Reading package lists... Done

答案1

PyCharm 无法从官方 Ubuntu 存储库获取,您必须从第三方 PPA 获取。因此,在要求apt-get安装软件包之前,您必须首先让其知道正确的 PPA。在终端中运行以下命令:

sudo add-apt-repository ppa:mystic-mirage/pycharm
sudo apt-get update

然后就可以安装PyCharm了:

sudo apt-get install pycharm

答案2

笔记:我认为这个答案的大部分内容已经过时了。请参阅我的另一个答案在这里了解安装 PyCharm 的最新方法集合。

原来的答案是:

PyCharm 不在官方存储库中。

不过,您有多种安装方式:

  • 启用 GetDeb 存储库并从那里安装 PyCharm:

    运行这三个命令来设置获取 Deb 仓库作为系统的软件源:

    echo 'deb http://archive.getdeb.net/ubuntu wily-getdeb apps' | sudo tee /etc/apt/sources.list.d/getdeb.list
    wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
    sudo apt-get update
    

    然后,您可以安装 PyCharm 社区版(撰写本文时版本为 5.0.1):

    sudo apt-get install pycharm
    

    您将通过 GetDeb 自动接收包更新,无需手动或使用其自己的更新程序更新 PyCharm。

  • 启用 PPA 并从那里安装 PyCharm:

    请参见这个答案路易斯·德索萨选择 PPA 选项。

    一旦其所有者上传新版本,您还将通过 PPA 收到自动软件包更新(通常不像 GetDeb 那样可靠和快速......)

  • 从 JetBrains 官方网站下载压缩档案:

    在PyCharm的开发公司JetBrains的官方主页上,有一个下载部分提供免费社区版和 30 天试用版专业版,适用于 Windows、OS X 和 Linux。

    直接下载链接 适用于 Linux 的最新 PyCharm 版本(免费社区版)

    Linux 官方安装说明是那些:

    • 复制pycharm-*.tar.gz到一个空目录(确保您对该目录具有 rw 权限)
    • pycharm-*.tar.gz使用以下命令解压:

      tar xfz pycharm-*.tar.gz
      
    • 删除 pycharm-*.tar.gz 以节省磁盘空间(可选)

    • pycharm.sh从 bin 子目录 运行

    笔记:Linux 上的 PyCharm 不需要特殊安装或运行任何安装脚本。它运行pycharm-*.tar.gz

    通过这种方式您不会获得任何自动包更新,但将依赖于 PyCharms 内部更新机制。

我个人最喜欢的是获取Deb,但你可以选择你喜欢的一个。

相关内容