apt-get

ubuntu通过apt-get方式搭建lnmp环境以及php扩展安装

*爱你&永不变心* 提交于 2019-12-03 10:20:41
一直是在用的lnmp的集成安装包搭建lnmp环境,因为工作需要需要安装ldap扩展,在网上怎么都找不到源码安装包,只能卸载掉原来的lnmp环境,用ubuntu的php5-ldap扩展, 在安装中遇到一些问题,网上的文章坑爹的比较多,写篇文章记录下来。 1.安装mysql sudo apt-get install mysql-server mysql-clien 安装过程中要输入root用户的密码。 我在安装中出错,是原来的mysql-cilent mysql-workbench 未完全卸载,将mysql组件完全卸载的方法: 删除mysql前 先删除一下 /var/lib/mysql 还有 /etc/mysql sudo rm /var/lib/mysql/ -R sudo rm /etc/mysql/ -R sudo apt-get autoremove mysql* --purge sudo apt-get remove apparmor 全部删除之后再执行 apt-get install mysql-server mysql -client 2.安装nginx sudo apt-get install nginx 3.安装成功后。我们重启下nginx服务 sudo service nginx restart 启动之后我们就可以访问以下我们的地址了

删除树莓派中自带的无用的套件

半腔热情 提交于 2019-12-03 09:21:22
首先,可以通过如下命令查看内存的使用情况: root@raspberrypi:~# df -h 下载的套件依旧在,移除掉因依赖关系而自动安装的套件 sudo apt-get clean sudo apt-get autoremove --purge 嗯,其实没多大变化。 看看选单Programming里头,嘿,不需要的东西还不少啊。 以底下指令来移除套件,IBM的Node-RED、Mathematica、Scratch、Sonic Pi、Minecraft Pi。 sudo apt-get remove --purge --auto-remove nodered wolfram-engine scratch scratch2 scratch3 sonic-pi minecraft-pi 其中移除wolfram-engine应可拿回650MB的空间,scratch约100MB,scratch2/3约470M,sonic-pi约200MB。 再移除两套Java IDE:BlueJ与Greenfoot,一套轻量型IDE:Geany: sudo apt-get remove --purge --auto-remove bluej greenfoot geany 移除掉Sense HAT Emulator: sudo apt-get remove --purge --auto-remove

Pip install Matplotlib error with virtualenv

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to install matplotlib in a new virtualenv. When I do: pip install matplotlib or pip install http : //sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/matplotlib-1.1.0.tar.gz I get this error: building 'matplotlib._png' extension gcc - pthread - fno - strict - aliasing - DNDEBUG - g - fwrapv - O2 - Wall - fPIC - DPY_ARRAY_UNIQUE_SYMBOL = MPL_ARRAY_API - DPYCXX_ISO_CPP_LIB = 1 - I / usr / local / include - I / usr / include - I . - I / home / sam / django - projects / datazone / local / lib / python2

What does “The APR based Apache Tomcat Native library was not found” mean?

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Tomcat 7 in Eclipse on Windows. When starting Tomcat, I am getting the following info message: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path What does this mean and how can I provide the APR library? 回答1: It means exactly what it says: "The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path" The library referred to is bundled into an OS specific dll

Installing apache 2.4 and php 5.5 on ubuntu 12.04

穿精又带淫゛_ 提交于 2019-12-03 09:00:59
问题 I'm trying to set a test enviroment with apache 2.4 and php 5.5 on a vm with ubuntu 12.04, fist thing is to add the repositories apt-add-repository ppa:ptn107/apache apt-add-repository ppa:ondrej/php5 Then installing apache 2.4 apt-get install apache2-mpm-worker checking apache version: # apache2 -v Server version: Apache/2.4.6 (Ubuntu) Server built: Sep 23 2013 07:23:34 Installing PHP 5.5 apt-get install php5-common php5-mysqlnd php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5

I have Python on my Ubuntu system, but gcc can't find Python.h

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am on a school computer, so I can't install anything. I am trying to create C code which can be run in Python. It seems all the articles I am finding on it require you to use #include I do this, but when I compile it complains that there is no such file or directory. The computer has Python (at least it has the python command in the terminal, and we can run whatever Python code we want). I typed in locate Python.h in the terminal, but it found nothing. I have two questions: Can I write C code that I can call in Python without Python.h ? Am

Unexpected error communicating with Stripe

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Billing with Stripe i have a form and i submit information and place the order following error has occured.... Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com. (Network error [errno 77]: error setting certificate verify locations: CAfile: C:\xampp\htdocs\PhpProject2\app\Lib\Stripe/../data/ca-certificates.crt CApath: none ) my controller action code if(!empty($this->request->data)){ $email = $this->request->data['email']; $credit_card = $this->request->data['card_number']; $expire_month

(Ubuntu 14.04) apt-get libopencv-dev, but get errors: Unable to correct problems, you have held broken packages

匿名 (未验证) 提交于 2019-12-03 08:50:26
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libopencv-dev : Depends: libopencv-objdetect-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed Depends:

Ubuntu15.04下搭建LNMP环境

亡梦爱人 提交于 2019-12-03 08:28:05
親測 PHP查詢數據庫正常 LNMP是Linux+Nginx+MySQL+PHP的简称,是一套完整的PHP网站服务器架构环境。 所用Linux发行版为Ubuntu Gnome 15.04,所有需要的软件均使用Ubuntu自带apt源下载安装。 首先,更新Ubuntu源: sudo apt-get update 然后,安装Nginx: sudo apt-get install nginx 等待nginx安装完成后,打开浏览器,在地址栏输入localhost,检测nginx是否开启;若开启成功,则会显示欢迎使用Nginx的界面;若没有,则在终端下输入以下命令即可打开nginx: sudo /etc/init.d/nginx start 然后安装mysql: sudo apt-get install mysql-server-5.6 mysql-workbench mysql-client-5.6 安装过程中需要设置root用户的密码,选择自己容易记住的密码即可。 接下来安装php: sudo apt-get install php5.6 php5.6-fpm php5.6-mysql php5.6-apc 至此所有基本组件已安装完毕,可以根据需要继续安装其它可选组件等。 配置php: 首先: sudo vim /etc/nginx/sites-available/default

Requirements file for apt-get, similar to pip

北战南征 提交于 2019-12-03 08:27:56
问题 I like how you can manage dependencies with pip requirements. Is there something similar in case of apt-get? http://www.pip-installer.org/en/latest/requirements.html#requirements-file-format 回答1: Your question is that you want to have a list of system dependences in one file, for being able to install it with one command. I don't recomend you to include the version of a package in the system dependencies. In the soft system dependences like " build-essential " or " uuid-dev " you normally