Ubuntu

CMake: wrong build target directory

≯℡__Kan透↙ 提交于 2021-02-04 19:20:43
问题 System : Linux anon-S 3.19.0-31-generic #36~14.04.1-Ubuntu SMP Thu Oct 8 10:21:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux CMake Version : anon@anon-S:~/$ cmake --version cmake version 3.2.2 Main CMakeLists.txt : cmake_minimum_required(VERSION 3.0) set(CMAKE_CXX_STANDARD 11) add_subdirectory(${PROJECT_SOURCE_DIR}/src) add_subdirectory(${PROJECT_SOURCE_DIR}/test) But anon@anon-S:/home/anon/project/build$ cmake .. -- Configuring done -- Generating done -- Build files have been written to: /home

How to install the libwebkitgtk package on Ubuntu 20.04 LTS?

跟風遠走 提交于 2021-02-04 18:11:28
问题 So I am trying to install Solar2D (formerly known as Corona SDK) to make a mobile game. After installing the dependencies, when I run Solar 2D I get the following error: /home/user/CoronaSimulator/CoronaSimulator: error while loading shared libraries: libwebkitgtk-3.0.so.0: cannot open shared object file: No such file or directory I tried installing libwebkitgtk using sudo apt-get install libwebkitgtk-1.0-0 but I get the following message in Terminal: Reading package lists... Done Building

Ubuntu上设置MySQL远程访问

≡放荡痞女 提交于 2021-02-04 17:58:15
1、查看MySQL端口允许访问的IP。 netstat -an| grep 3306 如果显示为以下内容,则表明只允许本机访问。 tcp 0 0 127.0 . 0.1 : 3306 0.0 . 0.0 :* LISTEN 2、修改/etc/mysql/mysql.conf.d/mysqld.cnf,将里面的 bind-address = 127.0 . 0.1 注释掉。 3、终端登录MySQL,给所有远程用户授权(下面两种方式根据实际情况选择一种)。 3.1 对所有远程用户授权。 grant all privileges on *.* to ' root ' @ ' % ' identified by ' 123456 ';  #root为远程登录用户,123456为远程登录用户的密码 3.2 对指定IP授权。 GRANT ALL PRIVILEGES ON *.* TO root@ ' 指定的IP地址 ' IDENTIFIED BY ' root用户密码 ' WITH GRANT OPTION; 4、重启MySQL。 /etc/init.d/mysql restart 5、重新查看端口。 #netstat -an| grep 3306 tcp6 0 0 ::: 3306 :::* LISTEN tcp6 0 0 192.168 . 4.128 : 3306 192.168 .

Automatically installing multiple apps on Android devices when connected to a linux system

流过昼夜 提交于 2021-02-04 16:45:37
问题 I had written some scripts using Ubuntu 14.04 and adb to automatically configure 100´s of Android smartphones. To achieve that I used an udev rule to identify if an USB device is attached to the pc and if that's the case I call my scripts to install some apps onto the devices. So far, so good but there are some problems. At the moment we are connecting 5 devices at the same time, but it happens quite often that on one of the devices one ore more apps are not being installed. It does not

「计算机网络」- 使用iperf测试网络吞吐 @20210204

冷暖自知 提交于 2021-02-04 16:14:14
内容简介 本文将介绍如何使用iperf进行网络吞吐测试。 iperf ? 通过iperf工具,可以测试两台主机间网络吞吐,比如带宽、延迟、抖动、丢包等等。它可以测试TCP吞吐,也可以测试UDP吞吐。 工作原理 测试两台主机间的吞吐,需要在两台主机中同时运行iperf命令。 壹台作为Server运行(iperf -s),负责丢弃流量。 壹台作为Client运行(iperf -c),负责生产流量。 安装命令 在每台主机执行如下命令安装iperf包: #!/bin/sh # Debian/Ubuntu apt-get update && apt-get install -y iperf # RHEL/CentOS yum install -y iperf 执行测试 # Server 在服务端执行如下命令: #!/bin/sh iperf -s # Client 在客户端执行如下命令: #!/bin/sh iperf -c '<server_ip_address>' # 关于防火墙 如果服务器开启防火墙,则需要添加端口。服务端默认使用5001端口。也可以使用选项-p指定自定义端口。 参考文献 WikiNotes/使用iperf测试网络吞吐 How to test the network speed/throughput between two Linux servers 来源:

How to compile doom on ubuntu?

眉间皱痕 提交于 2021-02-04 15:40:41
问题 I am trying to compile the source code for the original doom as a way to learn C. I downloaded it from github and fixed an obvious mistake in i_video.c line 49 (errnos.h -> errno.h). I now get this: m_misc.c:257:5: warning: initialization from incompatible pointer type [enabled by default] m_misc.c:257:5: warning: (near initialization for ‘defaults[14].location’) [enabled by default] m_misc.c:257:5: error: initializer element is not computable at load time m_misc.c:257:5: error: (near

unable to connect to mysql database in Ubuntu

久未见 提交于 2021-02-04 15:28:41
问题 I'm facing this problem for few days now. I'm trying to connect to my MySQL on Ubuntu machine. But I'm not getting this thru. Please see the following commands that I ran and the error messages. root@ipadtest:/var/lib/mysql# mysql start Warning: World-writable config file '/etc/mysql/my.cnf' is ignored ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) root@ipadtest:/var/lib/mysql# mysql -uroot -p Warning: World-writable config file '

Ubuntu 14.04 - Python 3.4 - pyenv: command Not Found

只愿长相守 提交于 2021-02-04 13:22:33
问题 I am trying to create a virtual environment for Python 3.4 on a fresh install of Ubuntu Server 14.04. I following the instructions for the venv module at: https://docs.python.org/3/library/venv.html#module-venv I don't have a lot of Python 3.4 or Ubuntu experience. When I type the command: pyvenv testDir I get back: pyvenv: command not found What is causing this? 回答1: Ubuntu 14.04 uses Python 2 by default, and the pyenv command does not exist in Python 2 out of the box. You can, however, use

PyAudio cannot find any output devices

北战南征 提交于 2021-02-04 12:36:05
问题 When I run: import pyaudio pa = pyaudio.PyAudio() pa.get_default_output_device_info() I get: IOError: No Default Output Device Available When I say: pa.get_device_count() It returns 0L . And of course if I list devices for i in range(0, device_count): print("Name: " + pa.get_device_info_by_index(i)["name"]) print("Index: " + pa.get_device_info_by_index(i)["index"]) print("\n") It will not print anything. I'm running Ubuntu 16.04 and have set my default sink by going: pacmd list-sinks pacmd

Check Resources Used by each Docker Container

半城伤御伤魂 提交于 2021-02-04 12:25:26
问题 How do you check the amount of resources (CPU, memory etc) being used by each Docker container that is running on the (Ubuntu) server? 回答1: you have docker stats see the doc http://docs.docker.com/reference/commandline/stats/ for example you can do docker stats $(docker ps -q) (that will display the id of the containers or if you want the name, see Is there any way to display container names in docker stats? , you can also you docker top if you are interested in a specific container http:/