我使用的是三星galaxy nexus手机(Android 4.0平台)。

我正在开发Ubuntu linux操作系统上的Android应用程序。我想直接在三星手机设备上运行我的应用程序,所以我执行了以下设置步骤:

在我的项目AndroidManifest.xml文件中,添加android:debuggable="true"到<application>元素 在设备的“设置”中,>安全启用未知源 在设备上,在设置>开发人员选项中启用了USB调试 在我的电脑上,创建了/etc/udev/rules.d/51-android.rules文件,内容如下: 子系统=="usb", ATTR{idVendor}=="04E8", MODE="0666", GROUP="插件开发" 在我的电脑上,执行chmod a+r /etc/udev/rules.d/51-android.rules命令

然后,在我的电脑上,我打开一个终端,执行adb设备命令,我得到:

List of devices attached 
????????????    no permissions

因为我没有看到我的设备,但只有????????????没有权限,然后运行以下命令:

 adb kill-server
 adb start-server
 adb devices

但我还是有:

List of devices attached 
????????????    no permissions

为什么?我错过了什么?

每次我尝试在Ubuntu 12.04中打开Eclipse时,我都会得到一个不满意的链接错误,它不会打开。我最近安装了java JDK和Android SDK,会是这个问题吗?我遵循了这个教程。

以下是日志信息:

!SESSION 2012-04-15 21:05:46.902 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2012-04-15 21:05:47.885
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.path
Can't load library: /home/tom/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /home/tom/.swt/lib/linux/x86_64/libswt-gtk.so

at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

我已经尝试卸载和重新安装,并删除~/。Eclipse目录,但它仍然不能工作

如何在Ubuntu上编写安装MySQL服务器的脚本?

Sudo apt-get install mysql将安装,但它也会要求在控制台中输入密码。

我如何以非交互的方式做到这一点?也就是说,写一个脚本,可以提供密码吗?

#!/bin/bash
sudo apt-get install mysql  # To install MySQL server

# How to write script for assigning password to MySQL root user
# End

在Linux命令行中,是否有可能每n秒重复一次命令?

假设,我有一个导入正在运行,我正在做

ls -l

检查文件大小是否在增加。我想有一个命令,有这个自动重复。

我试图在使用OpenSSL 1.0.0的Ubuntu 10.04 LTS上构建一些代码。当我运行make时,它使用“-lssl”选项调用g++。资料来源包括:

#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/des.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>

我跑:

$ sudo apt-get install openssl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openssl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

但是我猜openssl包不包括这个库。我在make时得到这些错误:

foo.cpp:21:25: error: openssl/bio.h: No such file or directory
foo.cpp:22:28: error: openssl/buffer.h: No such file or directory
foo.cpp:23:25: error: openssl/des.h: No such file or directory
foo.cpp:24:25: error: openssl/evp.h: No such file or directory
foo.cpp:25:25: error: openssl/pem.h: No such file or directory
foo.cpp:26:25: error: openssl/rsa.h: No such file or directory

如何在Ubuntu 10.04 LTS上安装OpenSSL c++库?

我为-l选项做了一个man g++和(在“链接选项”下),它声明:“链接器为库搜索一个标准目录列表…”和“搜索的目录包括几个标准系统目录…”这些标准系统目录是什么?

突然我得到下面的nginx错误

 * Restarting nginx
 * Stopping nginx nginx
   ...done.
 * Starting nginx nginx
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
   ...done.
   ...done.

如果我跑

lsof -i :80 or sudo fuser -k 80/tcp 

我什么也得不到。80端口上没有东西

然后我运行如下:

sudo netstat -pan | grep ":80"
tcp        0      0 127.0.0.1:8070          0.0.0.0:*               LISTEN      15056/uwsgi     
tcp        0      0 10.170.35.97:39567      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39564      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39584      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39566      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39571      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39580      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39562      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39582      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39586      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39575      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39579      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39560      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39587      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39591      10.158.58.13:8080       TIME_WAIT   -               
tcp        0      0 10.170.35.97:39589      10.158.58.13:8080       TIME_WAIT   - 

我被难住了。我如何调试这个?

我在端口8070上使用带有代理通道的uwsgi。Uwsgi正在运行。Nginx则不然。我使用的是ubuntu 12.4

下面是我的nginx conf文件的相关部分

upstream uwsgi_frontend {
          server 127.0.0.1:8070;
        }
server {
listen 80;
        server_name 127.0.0.1;
        location = /favicon.ico {
                  log_not_found off;
                }



                location / {
                       include uwsgi_params;
                       uwsgi_buffering off;

                       uwsgi_pass 127.0.0.1:8070;
                 }
        }

下面是我在ubuntu 12.04上安装nginx的方法

nginx=stable;add-apt-repository ppa:nginx/$nginx;
apt-get update
apt get install nginx-full

我想做一个go get:

go get github.com/go-sql-driver/mysql

它失败,并出现以下错误:

package github.com/go-sql-driver/mysql: cannot download, $GOPATH not set. For more details see: go help gopath

当我做一个go env,一个go值列表如下所示:

ubuntu@ip-xxx-x-xx-x:~$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CGO_ENABLED="1"

显然GOPATH没有设置,我该如何设置,在哪里设置?

我看到许多线程提到了这个错误,但没有一个线程提供了我的问题的答案,需要编辑哪个文件来为这个路径提供一个值?

我正在尝试将nodeJs安装到我的Ubuntu 14.04中,以便使用GruntJs。

我读过关于Ubuntu不同的安装方法(问题?),所以我是这样安装它的:

sudo apt-get install npm

sudo npm install -g grunt-cli

输入grunt之后,我得到了错误:

/usr/bin/env: node: No such file or directory

所以,我试过:

curl -sL https://deb.nodesource.com/setup | sudo bash -

sudo apt-get install -y nodejs

sudo apt-get update

再次尝试,仍然得到错误,我尝试了:

sudo add-apt-repository https://launchpad.net/~chris-lea/+archive/node.js/

sudo apt-get install -y nodejs

我得到了这个信息:

nodejs is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.

以防万一,我试着清理了一下:

sudo apt-get autoremove

但是,错误仍然存在:当我输入grunt时,我仍然得到/usr/bin/env: node: No这样的文件或目录

我该怎么办?

我正在寻找Ubuntu/Debian上的颜色选择工具。 任何简单易用的东西。

我需要找到我安装了哪个版本的TensorFlow。我使用的是Ubuntu 16.04长期支持。