问题标签 [ubuntu-16.04]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
344530 浏览

java - How to install Maven 3 on Ubuntu 18.04/17.04/16.10/16.04 LTS/15.10/15.04/14.10/14.04 LTS/13.10/13.04 by using apt-get?

Try:

If it works for you ignore the rest of this post.

Intro

I started setting up my Ubuntu 12.10 on April 2013 and the normal sudo apt-get install maven was not working for maven 3 back then.

The manual installation in this post is useful if you like to dig in deeper to your ubuntu kernel in regards with apt-get and where it finds the list of applications that are available for installation on Ubuntu . It can also be potentially useful for more recent releases of Ubuntu like Ubuntu 15.04, etc. if you face the same problem as I did back then with Ubuntu 12.10.

Automatic Installation via apt-get:

Checkout the manual installation if your current ubuntu can not install maven via common 'apt-get install maven'.

Make sure to remove maven 2 if your ubuntu is not fresh or if you were using maven 2 before:

Manual Installation via apt-get by adding maven 3 repository (Ubuntu 14.04 check out update 1):

This can be useful if your ubuntu apt-get repositories list is not up to date.

Maven 3 was required to set up the system and as it turns out most of the documents out there are referring to how to install Maven to Ubuntu version 12.04 or before. Best document I found was:

killertilapia's blog

The whole process I came up with is as follows:

  1. sudo -H gedit /etc/apt/sources.list
  2. Add the following line the sources.list file:

    deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main

    deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main

  3. sudo apt-get update && sudo apt-get install maven3

  4. sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn

Caution 1: command "sudo apt-add-repository ppa:natecarlson/maven3" did not work on my Ubuntu and had to run sudo apt-add-repository -rm ppa:natecarlson/maven3 to get my apt-get to work again.

Caution 2: thanks to David, you need to remove your existing symbolic link to previous versions of maven before running step 4.

OS X Installation

I decided to add OS X installation in case you use multiple environments for your dev: See the source stackoverflow thread for more details.

Install Homebrew that is the equavalent of apt-get, then install Maven using:

Update 1: Installation for Ubunutu 14.04

Haven't tried this myself but I am confident this should work without security warnings:

Note: source here, many thanks and +1s to @rendybjunior, @Dominic_Bartl, and @FunThomas424242

0 投票
0 回答
2666 浏览

ubuntu-14.04 - 为什么 ALSA lib 在 Ubuntu 中不起作用?

我正在使用portaudio. 任何想法如何解决这个问题?

Ubuntu:14.04、16.04

0 投票
1 回答
254 浏览

frama-c - Frama-C 出错(Ubuntu 16.04 LTS):错误:未绑定模块 Dgraph

这个Frama-C Magnesium-20151002,编译环境是Ubuntu 16.04(Xenial)。

0 投票
4 回答
7463 浏览

c# - 在 ubuntu 16.04 上安装“monodevelop”IDE 后找不到 asp.net 模板

我目前从mono官方网站安装了mono-complete和monodevelop,并在下面输入了这个命令

在我的 ubuntu 16.04 上,但是当我打开 monodevelop IDE 并尝试创建新的解决方案时,没有按预期找到 asp.net 模板,因此不允许创建像 asp.net mvc 这样的 Web 项目!我得到的唯一模板就是这个

之后我从突触中删除了单声道包并从 ubuntu 软件中心重新安装了它,但我得到了相同的结果

这就是我运行 sudo apt-get update 时在终端中得到的

0 投票
3 回答
15677 浏览

python - 如何使用 Cython 将 Python 3 编译成 C

我正在尝试将 Python 3 脚本转换为 C,然后将该 C 文件编译为可执行文件。

我有这个简单的python脚本:

我已使用以下方法将此脚本转换为 C:

然后我使用以下方法编译了 C 文件:

输入最后一个命令后,出现错误:

致命错误:Python.h:没有此类文件或目录编译终止。

在我得到错误后,我回过头来意识到我正在使用 Python3,并且我忘记了“cython”之后的“3”。
因此使用以下命令重新编译了 python 脚本:

然后尝试使用以下命令重新编译 C 文件:

这再次失败并引发了同样的错误,所以我在 SO 和 Google 上搜索并发现了这些问题:

这些问题中的这些答案都不起作用。

我已经确保我已经使用 cython 安装了所有正确的依赖项apt-get install,但遗憾的pip install是它似乎仍然无法正常工作。

0 投票
2 回答
3894 浏览

python-2.7 - pip install 产生 OSError: [Errno 13] Permission denied:

我想通过 pip 在 vi​​rtualenv 中安装十个包。

正如https://stackoverflow.com/a/27939356/1063287所建议的那样,我可能sudo在匆忙中使用不当以使其“工作” ,即我使用sudo安装了virtualenv:

sudo virtualenv --no-site-packages ENV

我这样做是因为没有 sudo 我得到了这个:

Ubuntu 16.04我看不到“磁盘工具”来测试提供的解决方案。

试图pip install lxml导致这个最终错误:

下面是另外两个示例:

点安装瓶:

pip 安装请求:

如果我使用sudo pip install bottle,我会得到:

sudo: pip: command not found

更新:

我提出了这个建议:

$sudo chown -R $(whoami) /var/www/html/ENV

现在可以 pip install bottle, requests, pymongo, beautifulsoup4, Beaker,pycryptotldextract. 但是,lxml并且pillow正在失败。

lxml 失败:

枕头失败:

我在这里尝试过这个建议:

https://stackoverflow.com/a/6504860/1063287

用于对这些剩余错误进行故障排除libxml2-devlibxslt1-devpython2.7-dev已经安装。

更新 2:

按照以下方式安装zlib1g-dev

https://stackoverflow.com/a/19289133/1063287

现在可以安装lxml了。

还是不能安装pillow

更新 3:

按照以下方式安装libjpeg8-dev

https://stackoverflow.com/a/33582789/1063287

现在可以安装pillow.

0 投票
1 回答
219 浏览

c++ - G_LOCK 行为从 glib 2.46 更改为 glib 2.48?

我正在查看一段代码,它直到最近才起作用。基本上,我有一个 C++ 类,在其中我使用 G_LOCK_DEFINE 宏保护变量。

构造函数在单独的 .cpp 文件中实现。

This variable is accessed in several functions, but the principle is always the same. Now, as already said, the code compiles fine and in fact did also run flawlessly in the past. Now, since recently, I'm getting a deadlock, whenever I come across a G_LOCK command. For debugging, I already restricted the program to just one thread, to exclude logical errors.

I did update to Ubuntu 16.04 beta recently, which pushed my glib version to 2.48.0-1ubuntu4. I already checked the changelog for relevant information on G_LOCK, but couldn't find anything. Did anybody else notice funny effects, when using G_LOCK macros with the recent glib version? Did I miss some changes here?

0 投票
2 回答
3188 浏览

ubuntu - 在 16.04 LTS 上安装 Docker

如何在 Ubuntu 16.04 LTS 上安装 docker

0 投票
1 回答
173 浏览

ubuntu - 如何在 ubuntu 16.04 下的 mcedit 中打开上下文菜单?

无法通过鼠标右键单击打开上下文菜单。它在 ubuntu 14.04 中运行良好。有什么办法可以解决吗?

0 投票
7 回答
317484 浏览

php - 包 php5 没有安装候选(Ubuntu 16.04)

当我尝试使用以下代码在 Ubuntu 16.04 中安装 php5 时:

我收到以下错误:

我已经尝试重新安装,但它没有帮助。

在我将 15.10 Ubuntu 更新到 16.04 后遇到了所有这些错误