首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >无法在Ubuntu上安装PEAR邮件

无法在Ubuntu上安装PEAR邮件
EN

Stack Overflow用户
提问于 2014-02-13 03:15:18
回答 1查看 2.1K关注 0票数 2

我不知道以前有没有人经历过这种事。我试图安装PEAR邮件,以便我可以使用外部服务器发送电子邮件。但是,当我输入以下命令时,我一直收到错误消息:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
:~# pear install Mail Mail_Mime

以下是错误消息:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
Did not download optional dependencies: pear/Net_SMTP, use --alldeps to download automatically
pear/Mail can optionally use package "pear/Net_SMTP" (version >= 1.4.1)

Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable.  Change download_dir config variable to a writeable dir
Error: cannot download "pear/Mail"

Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable.  Change download_dir config variable to a writeable dir
Error: cannot download "pear/Mail_Mime"
Download failed
install failed

我做错什么了吗?我在研究Ubuntu。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<?php

  require_once "Mail.php";

 $from = "Sandra Sender <info@me.org>";
 $to = "Ramona Recipient <some@somedomain.com>";
 $subject = "Hi!";
 $body = "Hi,\n\nHow are you?";

 $host = "ssl://xxx.xxx.xxx";
 $port = "465";
 $username = "me@domain.org";
 $password = "password";

 $headers = array ('From' => $from,
   'To' => $to,
   'Subject' => $subject);
 $smtp = Mail::factory('smtp',
   array ('host' => $host,
     'port' => $port,
     'auth' => true,
     'username' => $username,
     'password' => $password));

 $mail = $smtp->send($to, $headers, $body);

 if (PEAR::isError($mail)) {
   echo("<p>" . $mail->getMessage() . "</p>");
  } else {
   echo("<p>Message successfully sent!</p>");
  } 
 ?>

任何帮助都将不胜感激。

更新:与-alldeps一起运行的也无助于:~# pear安装-alldeps邮件Mail_Mime

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2"

Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable.  Change download_dir config variable to a writeable dir
Error: cannot download "pear/Mail"

Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable.  Change download_dir config variable to a writeable dir
Error: cannot download "pear/Mail_Mime"

Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable.  Change download_dir config variable to a writeable dir
Error: cannot download "pear/Net_SMTP"

Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable.  Change download_dir config variable to a writeable dir
Error: cannot download "pear/Net_Socket"

Warning: mkdir(): File exists in System.php on line 277
PHP Warning:  mkdir(): File exists in /usr/share/php/System.php on line 277

Warning: mkdir(): Not a directory in System.php on line 277
PHP Warning:  mkdir(): Not a directory in /usr/share/php/System.php on line 277
download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable.  Change download_dir config variable to a writeable dir
Error: cannot download "pear/Auth_SASL"
Download failed
install failed
EN

回答 1

Stack Overflow用户

发布于 2014-02-13 12:35:05

似乎您的下载目录设置为/build/buildd/php5-5.3.2/,这是不可写的。

因此,您需要使用chmod使其可写:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# chmod -R 777 /build/buildd/php5-5.3.2/pear-build-download

甚至可能您的pear配置中的设置是您的系统以前某个版本遗留下来的,因此您可能需要重新创建该目录结构,然后执行chmod:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# mkdir -p /build/buildd/php5-5.3.2/pear-build-download
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21752617

复制
相关文章
#15. 钻石
钻石 diamond.in/.out/.cpp 【问题描述】 你有 n 个 “量子态” 的盒子,每个盒子里可能是一些钱也可能是一个钻 石。 现在你知道如果打开第 i 个盒子,有P i 100  Pi100 的概率能获得V i  Vi 的钱,有1-P i 100  Pi100 的概率能获得一个钻石。 现在你想知道,自己恰好获得 k(0 ≤ k ≤ n) 个钻石,并且获得钱数大 于等于 m 的概率是多少。 请你对 0 ≤ k ≤ n 输出 n+1 个答案。 答案四舍五入保留 3 位小数。 【输入格式】 第一行两
attack
2018/04/12
5400
Python super(钻石继承)
可以看到Base被初始化了两次!这是由于Medium1和Medium2各自调用了Base的初始化函数导致的。
用户7886150
2021/01/24
7960
[编程题] 彩色瓷砖分析代码
牛牛喜欢彩色的东西,尤其是彩色的瓷砖。牛牛的房间内铺有L块正方形瓷砖。每块砖的颜色有四种可能:红、绿、蓝、黄。给定一个字符串S, 如果S的第i个字符是'R', 'G', 'B'或'Y',那么第i块瓷砖的颜色就分别是红、绿、蓝或者黄。 牛牛决定换掉一些瓷砖的颜色,使得相邻两块瓷砖的颜色均不相同。请帮牛牛计算他最少需要换掉的瓷砖数量。
desperate633
2018/08/22
9030
CVD制备钻石
CVD也就是化学气相沉淀法,英文名称Chemical Vapor Deposition,半导体行业常用的一类成膜设备,LPCVD\PECVD等等。这种技术又是如何能制备出强度那么大的钻石呢。
用户2760455
2022/06/08
5100
CVD制备钻石
【蓝桥杯】ALGO-11 瓷砖铺放
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
喜欢ctrl的cxk
2019/11/13
5100
试题 算法训练 瓷砖铺放
  有一长度为N(1<=N<=10)的地板,给定两种不同瓷砖:一种长度为1,另一种长度为2,数目不限。要将这个长度为N的地板铺满,一共有多少种不同的铺法?   例如,长度为4的地面一共有如下5种铺法:   4=1+1+1+1   4=2+1+1   4=1+2+1   4=1+1+2   4=2+2   编程用递归的方法求解上述问题。
SingYi
2022/07/13
4110
翻转瓷砖Fliptile(开关反转)- POJ 3279
Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 15; 1 ≤ N ≤ 15) of square tiles, each of which is colored black on one side and white on the other side.
ACM算法日常
2018/08/07
9150
用R语言做钻石价格预测
作者:夏尔康 https://ask.hellobi.com/blog/xiaerkang/4424 1.1问题描述和目标 因为钻石的价格定价取决于重量,颜色,刀工等影响,价格该如何制定合理,为公司抢占市场制定价格提供依据。 1.2数据说明 这里我使用的是R语言里面数据集diamonds,如果看这本《ggplot2:数据分析与图形艺术》应该对这个数据都不会太陌生。该数据集收集了约54000颗钻石的价格和质量的信息。每条记录由十个变量构成,其中有三个是名义变量,分别描述钻石的切工,颜色和净度; car
机器学习AI算法工程
2018/03/13
1.8K0
用R语言做钻石价格预测
pat 520钻石争霸赛
快速读题从样例读取大概意思,从1-n个数中,除去有d的忌讳数字。第一感觉遍历,直接遍历从1-n,对每一个数字进行判断,获取每个数字的个位数,十位数…可以使用%10。但这里我直接存储为string类型,is_right()函数判断是否是忌讳数字d,主函数一层for循环。时间复杂度不太好计算,往后数越大,判断循环的也越大。但是基本还是o(n)
废江_小江
2022/09/05
3900
pat 520钻石争霸赛
陶哲轩等人用编程方法,推翻了60年几何难题「周期性平铺猜想」
机器之心报道 机器之心编辑部 数学家们曾预测,如果对形状如何平铺空间施加足够的限制,他们可能必然出现周期性模式,但事实证明不是这样。 几何学中,最难攻克的问题往往是一些最古老、最简单的问题。 自古以来,艺术家和几何学家们就想知道几何形状如何在没有间隙或重叠的情况下铺满整个平面。然而用罗切斯特大学数学家 Alex Isoevich 的话来说——这个问题「直到最近才有所进展。」 ‍ 数学家想知道什么时候可以形成非周期性的平铺模式——像彭罗斯平铺这样的模式,永远不会重复。 最明显的瓷砖重复模式是:用正方形、三角
机器之心
2023/03/29
4530
陶哲轩等人用编程方法,推翻了60年几何难题「周期性平铺猜想」
将数组旋转90度(旋转图像)
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise).
用户5513909
2023/04/25
1.7K0
将数组旋转90度(旋转图像)
1824. 钻石收藏家(双指针模板)
为了使展示柜中的钻石尺寸大小相似,她不会将两颗尺寸大小相差超过 K 的钻石同时放在柜子中(刚好相差 K,则没有问题)。
浪漫主义狗
2023/09/04
1430
1824. 钻石收藏家(双指针模板)
1824. 钻石收藏家(双指针模板)
为了使展示柜中的钻石尺寸大小相似,她不会将两颗尺寸大小相差超过 K 的钻石同时放在柜子中(刚好相差 K,则没有问题)。
浪漫主义狗
2022/07/11
1760
1824. 钻石收藏家(双指针模板)
C语言实例之打印沙漏、打印钻石
题目链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805145370476544
程序员小顺
2021/10/13
2.2K0
_图片旋转
图片旋转是对图片最简单的处理方式之一,在本题中,你需要对图片顺时针旋转90度。 我们用一个nxm的二维数组来表示一个图片,例如下面给出一个3x4的图片的例子:
会洗碗的CV工程师
2023/11/24
1110
_图片旋转
LeetCode 790. 多米诺和托米诺平铺(动态规划)
有两种形状的瓷砖: 一种是 2x1 的多米诺形, 另一种是形如 “L” 的托米诺形。 两种形状都可以旋转。
Michael阿明
2021/02/19
5850
LeetCode 790. 多米诺和托米诺平铺(动态规划)
旋转投影
算法:旋转投影是通过照相机旋转进行投影,围绕一个随机的三维向量进行增量旋转的投影。
裴来凡
2022/05/29
1.1K0
旋转投影
旋转魔方
旋转魔方 写在前面 我们可以失望,但不可以盲目 实现效果 实现思路 通过transfrom属性来摆放图片形成一个正方体 给整个正方体定义一些样式,通过js来选择正方体使用哪种样式,也就是显示哪张
小丞同学
2021/08/16
8620
图像旋转
描述 输入一个n行m列的黑白图像,将它顺时针旋转90度后输出。 输入第一行包含两个整数n和m,表示图像包含像素点的行数和列数。1 <= n <= 100,1 <= m <= 100。 接下来n行,每行m个整数,表示图像的每个像素点灰度。相邻两个整数之间用单个空格隔开,每个元素均在0~255之间。输出m行,每行n个整数,为顺时针旋转90度后的图像。相邻两个整数之间用单个空格隔开。样例输入 3 3 1 2 3 4 5 6 7 8 9 样例输出 7 4 1 8 5 2 9 6 3 #include<iostrea
用户1631856
2018/04/12
2K0
图像旋转
问题描述 试题编号: 201503-1 试题名称: 图像旋转 时间限制: 5.0s 内存限制: 256.0MB 问题描述: 问题描述   旋转是图像处理的基本操作,在这个问题中,你需要将一个图像逆时针旋转90度。   计算机中的图像表示可以用一个矩阵来表示,为了旋转一个图像,只需要将对应的矩阵旋转即可。 输入格式   输入的第一行包含两个整数n, m,分别表示图像矩阵的行数和列数。   接下来n行每行包含m个整数,表示输入的图像。 输出格式   输出m行,每行包含n个整数,表示原始矩阵逆时针旋转90度后的矩阵。 样例输入 2 3 1 5 3 3 2 4 样例输出 3 4 5 2 1 3 评测用例规模与约定   1 ≤ n, m ≤ 1,000,矩阵中的数都是不超过1000的非负整数。
geekfly
2022/05/06
9430

相似问题

无法创建令牌:不建议对字符串中的键进行隐式转换。请使用InMemory或LocalFileReference类

11

拉勒维尔护照

63

拉勒维尔的护照是什么?

30

拉勒维尔护照(无法理解)

10

拉勒维尔护照总是没有诱惑的

20
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文